diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index bdcce712..187a23f0 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -6,20 +6,15 @@ ################################# name: Lint Code Base -# -# Documentation: -# https://help.github.com/en/articles/workflow-syntax-for-github-actions -# - ############################# # Start the job on all push # ############################# on: push: branches-ignore: [master, main] - # Remove the line above to run when pushing to master - #pull_request: - #branches: [master, main] + # Remove the line above to run when pushing to master or main + # pull_request: + # branches: [master, main] ############### # Set the Job # @@ -31,6 +26,14 @@ jobs: # Set the agent to run on runs-on: ubuntu-latest + ############################################ + # Grant status permission for MULTI_STATUS # + ############################################ + permissions: + contents: read + packages: read + statuses: write + ################## # Load all steps # ################## @@ -39,17 +42,18 @@ jobs: # Checkout the code base # ########################## - name: Checkout Code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: - # Full git history is needed to get a proper list of changed files within `super-linter` + # Full git history is needed to get a proper + # list of changed files within `super-linter` fetch-depth: 0 ################################ # Run Linter against code base # ################################ - name: Lint Code Base - uses: docker://ghcr.io/github/super-linter:slim-v4 + uses: super-linter/super-linter/slim@v5 env: VALIDATE_ALL_CODEBASE: false - DEFAULT_BRANCH: master - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DEFAULT_BRANCH: main + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9de47430..ed66160a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,7 +7,7 @@ jobs: gradle: runs-on: macos-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: distribution: temurin @@ -16,7 +16,7 @@ jobs: - name: Gradle build uses: gradle/gradle-build-action@v2 with: - arguments: build + arguments: build -x iosX64Test -x jsBrowserTest - name: Publish to SNAPSHOT uses: gradle/gradle-build-action@v2 diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index a7983742..5121e2fb 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -5,7 +5,7 @@ jobs: gradle: runs-on: macos-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: distribution: temurin @@ -14,4 +14,4 @@ jobs: - name: Gradle build uses: gradle/gradle-build-action@v2 with: - arguments: build + arguments: build -x iosX64Test -x jsBrowserTest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ebaceffe..f9f761ce 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,7 @@ jobs: gradle: runs-on: macos-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: distribution: temurin @@ -16,7 +16,7 @@ jobs: - name: Gradle build uses: gradle/gradle-build-action@v2 with: - arguments: build + arguments: build -x iosX64Test -x jsBrowserTest - name: Publish to MavenCentral uses: gradle/gradle-build-action@v2 diff --git a/build.gradle.kts b/build.gradle.kts index baaf7563..e05a2eb8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,6 @@ plugins { - kotlin("multiplatform") version "1.9.0" apply false - id("org.jetbrains.kotlinx.kover") version "0.7.2" apply false + kotlin("multiplatform") version "1.9.20" apply false + id("org.jetbrains.kotlinx.kover") version "0.7.4" apply false } val isReleaseBuild: Boolean diff --git a/fuel-kotlinx-serialization/build.gradle.kts b/fuel-kotlinx-serialization/build.gradle.kts index be61ebcc..22d2afa6 100644 --- a/fuel-kotlinx-serialization/build.gradle.kts +++ b/fuel-kotlinx-serialization/build.gradle.kts @@ -1,6 +1,6 @@ plugins { kotlin("multiplatform") - kotlin("plugin.serialization") version "1.9.0" + kotlin("plugin.serialization") version "1.9.20" id("publication") id("org.jetbrains.kotlinx.kover") } @@ -14,11 +14,11 @@ kotlin { useJUnit() } } - js(IR) { + js { browser() binaries.executable() } - ios { + iosArm64 { binaries { framework { baseName = "Fuel-Serialization" @@ -32,6 +32,13 @@ kotlin { } } } + iosX64 { + binaries { + framework { + baseName = "Fuel-Serialization" + } + } + } macosX64 { binaries { framework { @@ -46,61 +53,26 @@ kotlin { } } } + explicitApi() + sourceSets { - val commonMain by getting { + commonMain { dependencies { api(project(":fuel")) api(libs.kotlinx.serialization.json) api(libs.result) } } - val commonTest by getting { + commonTest { dependencies { implementation(kotlin("test")) } } - val jvmMain by getting - val jvmTest by getting { + jvmTest { dependencies { implementation(libs.mockwebserver) } } - val jsMain by getting - val jsTest by getting - - val appleMain by creating { - dependsOn(commonMain) - } - - val iosMain by getting { - dependsOn(appleMain) - } - val macosArm64Main by getting { - dependsOn(appleMain) - } - val macosX64Main by getting { - dependsOn(appleMain) - } - val iosSimulatorArm64Main by getting { - dependsOn(appleMain) - } - - val appleTest by creating { - dependsOn(commonTest) - } - - val iosTest by getting { - dependsOn(appleTest) - } - val macosArm64Test by getting { - dependsOn(appleTest) - } - val macosX64Test by getting { - dependsOn(appleTest) - } - val iosSimulatorArm64Test by getting { - dependsOn(appleTest) - } } } diff --git a/fuel-moshi-jvm/build.gradle.kts b/fuel-moshi-jvm/build.gradle.kts index 91a8f5bd..63427c0d 100644 --- a/fuel-moshi-jvm/build.gradle.kts +++ b/fuel-moshi-jvm/build.gradle.kts @@ -2,7 +2,7 @@ plugins { kotlin("jvm") id("publication") id("org.jetbrains.kotlinx.kover") - id("com.google.devtools.ksp") version "1.9.0-1.0.11" + id("com.google.devtools.ksp") version "1.9.20-1.0.14" } kotlin { diff --git a/fuel/build.gradle.kts b/fuel/build.gradle.kts index 1c7fecf8..f7e7242f 100644 --- a/fuel/build.gradle.kts +++ b/fuel/build.gradle.kts @@ -13,11 +13,11 @@ kotlin { useJUnit() } } - js(IR) { + js { browser() binaries.executable() } - ios { + iosArm64 { binaries { framework { baseName = "Fuel" @@ -31,6 +31,13 @@ kotlin { } } } + iosX64 { + binaries { + framework { + baseName = "Fuel" + } + } + } macosX64 { binaries { framework { @@ -48,57 +55,41 @@ kotlin { explicitApi() + targets.configureEach { + compilations.configureEach { + compilerOptions.configure { + freeCompilerArgs.add("-Xexpect-actual-classes") + } + } + } + sourceSets { - val commonMain by getting { + commonMain { dependencies { api(libs.kotlinx.coroutines.core) } } - val commonTest by getting { + commonTest { dependencies { implementation(kotlin("test")) } } - val jvmMain by getting { + jvmMain { dependencies { api(libs.okhttp.coroutines) } } - val jvmTest by getting { + jvmTest { dependencies { implementation(libs.mockwebserver) } } - - val jsMain by getting { - /*dependencies { - api(npm("node-fetch", "2.6.1")) - api(npm("abort-controller", "3.0.0")) - }*/ - } - val jsTest by getting - - val appleMain by creating { - dependsOn(commonMain) + appleMain { dependencies { implementation(libs.okio) } } - - val iosMain by getting { - dependsOn(appleMain) - } - val macosArm64Main by getting { - dependsOn(appleMain) - } - val macosX64Main by getting { - dependsOn(appleMain) - } - val iosSimulatorArm64Main by getting { - dependsOn(appleMain) - } - val iosTest by getting } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 40fbff84..d42dae65 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,13 +1,13 @@ [versions] -coroutines = "1.7.2" -jackson = "2.15.2" +coroutines = "1.7.3" +jackson = "2.15.3" junit = "4.13.2" moshi = "1.15.0" okhttp = "5.0.0-alpha.11" -okio = "3.4.0" +okio = "3.6.0" forge = "1.0.0-alpha3" -result = "5.4.0" -serialization = "1.5.1" +result = "5.5.0" +serialization = "1.6.0" [libraries] kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "coroutines" } @@ -22,4 +22,3 @@ okio = { group = "com.squareup.okio", name = "okio", version.ref = "okio"} forge = { group = "com.github.kittinunf.forge", name = "forge", version.ref = "forge" } result = { group = "com.github.kittinunf.result", name = "result", version.ref = "result"} result-jvm = { group = "com.github.kittinunf.result", name = "result-jvm", version.ref = "result"} - diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 943f0cbf..ccebba77 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index bdc9a83b..744c64d1 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 65dcd68d..79a61d42 100755 --- a/gradlew +++ b/gradlew @@ -144,7 +144,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -152,7 +152,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac diff --git a/samples/mockbin-native/build.gradle.kts b/samples/mockbin-native/build.gradle.kts index 9be7fe0b..bfdedc53 100644 --- a/samples/mockbin-native/build.gradle.kts +++ b/samples/mockbin-native/build.gradle.kts @@ -17,16 +17,10 @@ kotlin { } sourceSets { - val commonMain by getting { + commonMain { dependencies { implementation(project(":fuel")) } } } - - kotlin.targets.withType(KotlinNativeTarget::class.java) { - binaries.all { - binaryOptions["memoryModel"] = "experimental" - } - } }