diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 43e209abc..c02297477 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,14 +10,14 @@ jobs: build: strategy: matrix: - os: [ macOS-latest, ubuntu-latest ] + os: [ macos-14, ubuntu-latest ] runs-on: ${{matrix.os}} name: Build on ${{matrix.os}} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Java - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'zulu' java-version: '17' @@ -25,53 +25,53 @@ jobs: if: matrix.os == 'ubuntu-latest' run: sudo apt-get update && sudo apt-get install libcurl4-openssl-dev libgtk-3-dev nodejs chromium-browser - name: Select Xcode version - if: matrix.os == 'macOS-latest' - uses: maxim-lobanov/setup-xcode@9a697e2b393340c3cacd97468baa318e4c883d98 + if: matrix.os == 'macos-14' + uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd with: - xcode-version: '14.2.0' + xcode-version: '15.2.0' + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + with: + gradle-home-cache-cleanup: true + cache-read-only: ${{ github.ref != 'refs/heads/master' }} + cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} - name: Validate Gradle Wrapper - uses: gradle/wrapper-validation-action@v1 + uses: gradle/wrapper-validation-action@v2 - name: Build Linux if: matrix.os == 'ubuntu-latest' - uses: gradle/gradle-build-action@v2 - with: - gradle-home-cache-cleanup: true - cache-read-only: ${{ github.ref != 'refs/heads/master' && github.ref != 'refs/heads/version-2.0' }} - arguments: | - build - publishAllFilteredToMavenLocal - -Ptarget=all_linux_hosted + run: > + ./gradlew + build + publishAllFilteredToMavenLocal + -Ptarget=all_linux_hosted - name: Build macOS - if: matrix.os == 'macOS-latest' - uses: gradle/gradle-build-action@v2 - with: - gradle-home-cache-cleanup: true - cache-read-only: ${{ github.ref != 'refs/heads/master' && github.ref != 'refs/heads/version-2.0' }} - arguments: | - :reaktive-annotations:build - :utils:build - :reaktive-testing:build - :reaktive:build - :coroutines-interop:build - :sample-mpp-module:build - publishAllFilteredToMavenLocal - -Ptarget=all_macos_hosted + if: matrix.os == 'macos-14' + run: + ./gradlew + :reaktive-annotations:build + :utils:build + :reaktive-testing:build + :reaktive:build + :coroutines-interop:build + :sample-mpp-module:build + publishAllFilteredToMavenLocal + -Ptarget=all_macos_hosted # Do not invoke from Gradle, it creates circular dependency (Gradle invokes XCode invokes Gradle). - name: Build iOS app - if: matrix.os == 'macOS-latest' + if: matrix.os == 'macos-14' working-directory: sample-ios-app run: > xcodebuild -project sample-ios-app.xcodeproj -scheme "sample-ios-app" -sdk "iphonesimulator" - -arch "x86_64" + -arch "arm64" - name: Bundle the build report if: failure() run: find . -type d -name 'reports' | zip -@ -r build-reports.zip - name: Upload the build report if: failure() - uses: actions/upload-artifact@master + uses: actions/upload-artifact@v4 with: name: error-report path: build-reports.zip diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4108f6186..d958bec0f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,62 +23,66 @@ jobs: publish: name: Publish - runs-on: macOS-latest + runs-on: macos-14 needs: create-staging-repository env: SIGNING_KEY: ${{ secrets.SIGNING_KEY }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Java - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'zulu' java-version: '17' - name: Select Xcode version - uses: maxim-lobanov/setup-xcode@9a697e2b393340c3cacd97468baa318e4c883d98 + uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd with: - xcode-version: '14.2.0' - - name: Publish - uses: gradle/gradle-build-action@v2 + xcode-version: '15.2.0' + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 with: cache-read-only: true - arguments: | - publishAllFilteredToSonatype - -Psigning.password=${{ secrets.SIGNING_PASSWORD }} - -Psonatype.username=${{ secrets.SONATYPE_USERNAME }} - -Psonatype.password=${{ secrets.SONATYPE_PASSWORD }} - -Psonatype.repository=${{ needs.create-staging-repository.outputs.repository-id }} + cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} + - name: Publish + run: > + ./gradlew + publishAllFilteredToSonatype + -Psigning.password=${{ secrets.SIGNING_PASSWORD }} + -Psonatype.username=${{ secrets.SONATYPE_USERNAME }} + -Psonatype.password=${{ secrets.SONATYPE_PASSWORD }} + -Psonatype.repository=${{ needs.create-staging-repository.outputs.repository-id }} check: name: Check publication - runs-on: macOS-latest + runs-on: macos-14 needs: [ create-staging-repository, publish ] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Java - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'zulu' java-version: '17' - name: Select Xcode version - uses: maxim-lobanov/setup-xcode@9a697e2b393340c3cacd97468baa318e4c883d98 + uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd with: - xcode-version: '14.2.0' - - name: Check publication - uses: gradle/gradle-build-action@v2 + xcode-version: '15.2.0' + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 with: cache-read-only: true - # Exclude kotlinStoreYarnLock because publication check project has different from the main project - # dependencies, and the task fails the build. Ignoring it looks fine. - arguments: | - :tools:check-publication:build - --exclude-task kotlinStoreYarnLock - -Pcheck_publication - -Psonatype.username=${{ secrets.SONATYPE_USERNAME }} - -Psonatype.password=${{ secrets.SONATYPE_PASSWORD }} - -Psonatype.repository=${{ needs.create-staging-repository.outputs.repository-id }} + cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} + - name: Check publication + run: > + ./gradlew + :tools:check-publication:build + --exclude-task kotlinStoreYarnLock + -Pcheck_publication + -Psonatype.username=${{ secrets.SONATYPE_USERNAME }} + -Psonatype.password=${{ secrets.SONATYPE_PASSWORD }} + -Psonatype.repository=${{ needs.create-staging-repository.outputs.repository-id }} close-staging-repository: runs-on: ubuntu-latest diff --git a/benchmarks/jmh/build.gradle b/benchmarks/jmh/build.gradle index c082fdc01..b6315f327 100644 --- a/benchmarks/jmh/build.gradle +++ b/benchmarks/jmh/build.gradle @@ -11,7 +11,7 @@ dependencies { } kotlin { - jvmToolchain(11) + jvmToolchain(17) } jmh { diff --git a/gradle.properties b/gradle.properties index 605d6f609..b2f8e0eeb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,8 @@ kotlin.code.style=official org.gradle.jvmargs=-Xmx4g -Dfile.encoding=UTF-8 org.gradle.parallel=true org.gradle.caching=true -org.gradle.configuration-cache=true +# https://youtrack.jetbrains.com/issue/KT-64851 +org.gradle.configuration-cache=false # AndroidX package structure to make it clearer which packages are bundled with the # Android operating system, and which are packaged with the app's APK diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 943f0cbfa..ccebba771 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 6ec1567a0..7fc84becc 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.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 65dcd68d6..79a61d421 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/rxjava2-interop/build.gradle b/rxjava2-interop/build.gradle index c01daeaf7..77255d441 100644 --- a/rxjava2-interop/build.gradle +++ b/rxjava2-interop/build.gradle @@ -16,7 +16,7 @@ compileKotlin { } compileJava { - targetCompatibility(JavaVersion.VERSION_1_8) + targetCompatibility = JavaVersion.VERSION_1_8 } publishing { diff --git a/rxjava3-interop/build.gradle b/rxjava3-interop/build.gradle index 288805700..69a6d579a 100644 --- a/rxjava3-interop/build.gradle +++ b/rxjava3-interop/build.gradle @@ -16,7 +16,7 @@ compileKotlin { } compileJava { - targetCompatibility(JavaVersion.VERSION_1_8) + targetCompatibility = JavaVersion.VERSION_1_8 } publishing {