Skip to content

Commit

Permalink
Merge branch 'main' into feature/backward-compatiability-test
Browse files Browse the repository at this point in the history
  • Loading branch information
sunny-chung committed Jul 7, 2024
2 parents ef3c544 + a3bd544 commit c4aca97
Show file tree
Hide file tree
Showing 133 changed files with 10,229 additions and 317 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/run-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,30 @@ jobs:
test:
strategy:
matrix:
os: [ubuntu-20.04, windows-2019, macos-11]
# macos-12 for Intel Mac, macos-14 for Apple Chips Mac
os: [ubuntu-20.04, windows-2019, windows-2022, macos-12, macos-14]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '17'
- run: ./gradlew check
- run: |
# start a virtual X server for Linux
if [ "$RUNNER_OS" == "Linux" ]; then
export DISPLAY=:99
sudo Xvfb -ac :99 -screen 0 1280x800x24 > /dev/null 2>&1 &
fi
./run-ci-test.sh
shell: bash # let Windows use bash
- uses: actions/upload-artifact@v3
with:
name: ux-test-result_${{ matrix.os }}
path: ux-and-transport-test/build/reports/tests/test
if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v3
with:
name: unit-test-result_${{ matrix.os }}
path: build/reports/tests
if: ${{ !cancelled() }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
/archived
/temp

### JVM ###
*.hprof
*.hprof.*

### Gradle ###
.gradle
build/
Expand Down
4 changes: 3 additions & 1 deletion .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ Watch the images and videos on the [website](https://sunny-chung.github.io/hello
- UUID (type `$((uuid))`)
- Current date-time ISO-8601 string (type `$((now.iso8601))`)
- Current timestamp (type `$((now.epochMills))` or `$((now.epochSeconds))`)
- Executing custom safe script to mutate a Request before firing it
- Copying as verbose cURL commands
- Copying as verbose [grpcurl](https://github.com/fullstorydev/grpcurl) commands
- Copying as PowerShell Invoke-WebRequest command (for Windows pwsh.exe)
Expand Down
46 changes: 34 additions & 12 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
}

group = "com.sunnychung.application"
version = "1.5.2" // must be in 'x.y.z' for native distributions
version = "1.6.0-SNAPSHOT" // must be in 'x.y.z' for native distributions

repositories {
google()
Expand All @@ -22,10 +22,11 @@ repositories {
}

val grpcVersion = "1.59.1"
val reactorNettyVersion = "1.1.20"

kotlin {
jvm {
jvmToolchain(11)
jvmToolchain(17)
withJava()
}
sourceSets {
Expand All @@ -37,6 +38,7 @@ kotlin {

implementation("co.touchlab:kermit:1.0.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-cbor:1.6.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor:1.8.1")

implementation("io.github.sunny-chung:httpclient5:5.2.1-inspect-patch5")
// implementation("com.squareup.okhttp3:okhttp:4.11.0")
Expand All @@ -45,6 +47,9 @@ kotlin {
implementation("com.squareup.okhttp3:logging-interceptor:4.11.0") {
exclude(group = "com.squareup.okhttp3", module = "okhttp")
}
implementation("io.projectreactor.netty:reactor-netty-core:$reactorNettyVersion")
implementation("io.projectreactor.netty:reactor-netty-http:$reactorNettyVersion")
implementation("org.springframework.boot:spring-boot-starter-webflux:3.2.6")
implementation("io.github.sunny-chung:Java-WebSocket:1.5.4-inspect-patch2")
implementation("com.graphql-java:graphql-java:21.3")

Expand All @@ -65,12 +70,18 @@ kotlin {
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.15.2")
implementation("com.jayway.jsonpath:json-path:2.8.0")

implementation("io.github.sunny-chung:kdatetime-multiplatform:0.5.0")
implementation("io.github.sunny-chung:kdatetime-multiplatform:1.0.0")

implementation("net.harawata:appdirs:1.2.2")
implementation("com.darkrockstudios:mpfilepicker:2.1.0")

implementation("org.jetbrains.compose.components:components-splitpane:1.5.2")

implementation("io.github.sunny-chung:kotlite-interpreter:1.1.0")
implementation("io.github.sunny-chung:kotlite-stdlib:1.1.0")

// implementation("org.apache.logging.log4j:log4j-api:2.23.1")
// implementation("org.apache.logging.log4j:log4j-core:2.23.1")
}

resources.srcDir("$buildDir/resources")
Expand All @@ -84,16 +95,26 @@ kotlin {
}
}

configurations.all {
resolutionStrategy.eachDependency {
if (requested.group in setOf("io.github.sunny-chung", "io.grpc") && requested.name in setOf("grpc-core", "grpc-api", "grpc-netty", "grpc-netty-shaded")) {
if (requested.version == grpcVersion) {
useTarget("io.github.sunny-chung:${requested.name}:$grpcVersion-patch1")
because("transport inspection")
allprojects {
if (project == rootProject || project.name in setOf("ux-and-transport-test")) {
configurations.all {
resolutionStrategy.eachDependency {
if (requested.group in setOf("io.github.sunny-chung", "io.grpc") && requested.name in setOf("grpc-core", "grpc-api", "grpc-netty", "grpc-netty-shaded")) {
if (requested.version == grpcVersion) {
useTarget("io.github.sunny-chung:${requested.name}:$grpcVersion-patch1")
because("transport inspection")
}
} else if (requested.group == "io.grpc" && requested.name.startsWith("grpc-") && requested.version?.startsWith("$grpcVersion-patch") == true) {
useVersion(grpcVersion)
because("not built")
} else if (requested.group == "io.projectreactor.netty" && requested.version?.startsWith("1.1.20") == true) {
useTarget("io.github.sunny-chung:${requested.name}:${requested.version}-patch1")
because("transport inspection")
} else if (requested.group == "io.netty" && requested.name in setOf("netty-codec", "netty-codec-http2") && requested.version == "4.1.110.Final") {
useTarget("io.github.sunny-chung:${requested.name}:${requested.version}-patch1")
because("transport inspection")
}
}
} else if (requested.group == "io.grpc" && requested.name.startsWith("grpc-") && requested.version?.startsWith("$grpcVersion-patch") == true) {
useVersion(grpcVersion)
because("not built")
}
}
}
Expand Down Expand Up @@ -142,6 +163,7 @@ compose.desktop {
val distributionVersion = "^(\\d+\\.\\d+\\.\\d+).*".toRegex().matchEntire(project.version.toString())!!.groupValues[1]

mainClass = "com.sunnychung.application.multiplatform.hellohttp.MainKt"
// jvmArgs += "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005" // to enable debugger for debug use only
nativeDistributions {
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
packageName = "Hello HTTP"
Expand Down
Binary file added doc/_include/pre-flight-script.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/_include/user-files.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions doc/features/data-import-export.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Data Import & Export

## Data Import

Welcome to bring in data from other applications to try Hello HTTP! Enjoy data freedom! Currently suppported data
Welcome to bring in data from other applications to try Hello HTTP! Enjoy data freedom! Currently supported data
formats are:

- Insomnia v4 JSON
Expand All @@ -15,7 +15,7 @@ formats are:
- Hello HTTP data dump

## Data Export
Create a manual backup, or leave anytime you want! Currently suppported data formats are:
Create a manual backup, or leave anytime you want! Currently supported data formats are:
- Insomnia v4 JSON
- Hello HTTP data dump
- Postman v2 Data Dump (One File per Project or Environment)
Expand Down
1 change: 1 addition & 0 deletions doc/features/environments.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Each environment may contain the followings:
- Zero or more variables
- HTTP protocol version preference
- SSL verification preference
- Zero or more user files (for scripts)

## Creating an Environment

Expand Down
Loading

0 comments on commit c4aca97

Please sign in to comment.