diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ae90062..26c9617 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,10 +17,10 @@ jobs: test: strategy: matrix: - os: [macos-14, windows-latest, ubuntu-latest] + os: [macos-latest, windows-latest, ubuntu-latest] include: - os: ubuntu-latest - GRADLE_ARGS: | + GRADLE_ARGS: >- apiCheck :test:check :colormath:compileKotlinLinuxArm64 @@ -29,8 +29,8 @@ jobs: :extensions:colormath-ext-android-colorint:check :extensions:colormath-ext-android-color:check --stacktrace - - os: macos-14 - GRADLE_ARGS: | + - os: macos-latest + GRADLE_ARGS: >- macosX64Test :colormath:compileKotlinMacosArm64 iosX64Test @@ -44,30 +44,21 @@ jobs: runs-on: ${{matrix.os}} steps: - uses: actions/checkout@v4 - - uses: graalvm/setup-graalvm@v1 - with: - java-version: 17 - distribution: 'graalvm-community' - set-java-home: false - uses: actions/setup-java@v4 with: distribution: 'zulu' java-version: 21 - uses: gradle/actions/setup-gradle@v3 - with: - arguments: ${{matrix.GRADLE_ARGS}} - - name: Bundle the build report - if: failure() - run: find . -type d -name 'reports' | zip -@ -r build-reports.zip + - run: ./gradlew ${{matrix.GRADLE_ARGS}} - name: Upload the build report if: failure() uses: actions/upload-artifact@master with: - name: error-report - path: build-reports.zip + name: build-report-${{ matrix.os }} + path: '**/build/reports' publish: needs: test - runs-on: macos-14 + runs-on: macos-latest if: ${{ github.ref == 'refs/heads/master' && github.repository == 'ajalt/colormath' }} steps: - uses: actions/checkout@v4 @@ -75,11 +66,10 @@ jobs: with: distribution: 'zulu' java-version: 21 + - uses: gradle/actions/setup-gradle@v3 - name: Deploy to sonatype - uses: gradle/actions/setup-gradle@v3 - with: - # disable configuration cache due to https://github.com/gradle/gradle/issues/22779 - arguments: publishToMavenCentral -PsnapshotVersion=true --no-configuration-cache + # disable configuration cache due to https://github.com/gradle/gradle/issues/22779 + run: ./gradlew publishToMavenCentral -PsnapshotVersion=true --no-configuration-cache env: ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_mavenCentralPassword }} ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ORG_GRADLE_PROJECT_signingInMemoryKey }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f809004..4306684 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,39 +7,42 @@ on: jobs: release: - runs-on: macos-14 + runs-on: macos-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 with: distribution: 'zulu' java-version: 21 - - uses: actions/setup-python@v5 - with: - python-version: '3.12' + - uses: gradle/actions/setup-gradle@v3 +# - uses: actions/setup-python@v5 +# with: +# python-version: '3.12' - run: ./gradlew publishToMavenCentral env: ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_mavenCentralPassword }} ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ORG_GRADLE_PROJECT_signingInMemoryKey }} ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_GRADLE_PROJECT_mavenCentralUsername }} - - name: Extract release notes - id: extract-release-notes - uses: ffurrer2/extract-release-notes@v2 - - name: Create release - uses: ncipollo/release-action@v1 - with: - body: ${{ steps.extract-release-notes.outputs.release_notes }} - - name: Dokka - uses: gradle/actions/setup-gradle@v3 - with: - arguments: dokkaHtml :website:wasmJsBrowserDistribution - - run: ./prepare_docs.sh - - name: Build mkdocs - run: | - pip install mkdocs-material - mkdocs build - - name: Deploy docs to website - uses: JamesIves/github-pages-deploy-action@v4 - with: - branch: gh-pages - folder: site +# - name: Extract release notes +# id: extract-release-notes +# uses: ffurrer2/extract-release-notes@v2 +# - name: Create release +# uses: ncipollo/release-action@v1 +# with: +# body: ${{ steps.extract-release-notes.outputs.release_notes }} +# - name: Dokka +# uses: gradle/actions/setup-gradle@v3 +# with: +# arguments: dokkaHtml :website:wasmJsBrowserDistribution +# - run: ./prepare_docs.sh +# - name: Build mkdocs +# run: | +# pip install mkdocs-material +# mkdocs build +# - name: Deploy docs to website +# uses: JamesIves/github-pages-deploy-action@v4 +# with: +# branch: gh-pages +# folder: site +env: + GRADLE_OPTS: -Dorg.gradle.configureondemand=true -Dorg.gradle.parallel=false -Dkotlin.incremental=false -Dorg.gradle.project.kotlin.incremental.multiplatform=false -Dorg.gradle.project.kotlin.native.disableCompilerDaemon=true -Dorg.gradle.jvmargs="-Dfile.encoding=UTF-8" diff --git a/.gitignore b/.gitignore index ddd506b..93a2271 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ site/ docs/js/gradient.js docs/js/converter.js kotlin-js-store/ +.kotlin/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d8323c..347c431 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog ## Unreleased +### Changed +- Update Kotlin to 2.0.0 ## 3.5.0 ### Added diff --git a/build.gradle.kts b/build.gradle.kts index c6d7423..0c0e1c0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,6 +13,7 @@ plugins { alias(libs.plugins.dokka).apply(false) alias(libs.plugins.publish).apply(false) alias(libs.plugins.jetbrainsCompose).apply(false) + alias(libs.plugins.compose.compiler) apply false alias(libs.plugins.kotlinBinaryCompatibilityValidator) } @@ -42,9 +43,6 @@ subprojects { jvmTarget.set(JvmTarget.JVM_1_8) } } - tasks.withType().configureEach { - options.release.set(8) - } plugins.withType().configureEach { configure { diff --git a/extensions/colormath-ext-jetpack-compose/build.gradle.kts b/extensions/colormath-ext-jetpack-compose/build.gradle.kts index 5138746..1f8be91 100644 --- a/extensions/colormath-ext-jetpack-compose/build.gradle.kts +++ b/extensions/colormath-ext-jetpack-compose/build.gradle.kts @@ -1,5 +1,6 @@ import com.vanniktech.maven.publish.tasks.JavadocJar import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl +import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension plugins { id("com.android.library") @@ -38,7 +39,6 @@ kotlin { } } -@Suppress("UnstableApiUsage") android { namespace = "com.github.ajalt.colormath.extensions.android.composecolor" compileSdk = 33 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 2980bb0..96b3775 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,7 +1,7 @@ [versions] -kotlin = "1.9.21" -compose = "1.6.0" -compose-plugin = "1.6.0" +kotlin = "2.0.0" +compose = "1.6.10" +compose-plugin = "1.6.10" [libraries] @@ -10,9 +10,9 @@ androidx-annotation = "androidx.annotation:annotation:1.7.0" compose-ui-graphics = { module = "org.jetbrains.compose.ui:ui-graphics", version.ref = "compose" } # used in tests -kotest = "io.kotest:kotest-assertions-core:5.8.0" +kotest = "io.kotest:kotest-assertions-core:5.9.0" junit = "junit:junit:4.13.2" -robolectric = "org.robolectric:robolectric:4.10" +robolectric = "org.robolectric:robolectric:4.12.2" # used in samples compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose" } @@ -21,11 +21,12 @@ compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" [plugins] dokka = "org.jetbrains.dokka:1.9.20" -publish = "com.vanniktech.maven.publish:0.27.0" +publish = "com.vanniktech.maven.publish:0.28.0" kotlinBinaryCompatibilityValidator = "org.jetbrains.kotlinx.binary-compatibility-validator:0.14.0" # used in extensions -android-library = "com.android.library:7.4.0" +android-library = "com.android.library:8.4.0" # used in samples jetbrainsCompose = { id = "org.jetbrains.compose", version.ref = "compose-plugin" } +compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index d64cd49..e644113 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 a80b22c..b82aa23 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.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/website/build.gradle.kts b/website/build.gradle.kts index fc60793..f193ca9 100644 --- a/website/build.gradle.kts +++ b/website/build.gradle.kts @@ -3,6 +3,7 @@ import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl plugins { kotlin("multiplatform") alias(libs.plugins.jetbrainsCompose) + alias(libs.plugins.compose.compiler) } kotlin { @@ -37,7 +38,3 @@ kotlin { } } } - -compose.experimental { - web.application {} -}