Skip to content

Commit

Permalink
Update kotlin monorepo to v2.0.21 (#106)
Browse files Browse the repository at this point in the history
* Update kotlin monorepo to v2.0.21

* Remove workaround for HiddenFromObjC

* Remove workaround for KT-70901

* Update dependency com.google.devtools.ksp to v2.0.21-1.0.26 (#107)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update Kotlin to 2.1.0

* Update the package lock for PRs when needed

* Enable incremental wasm compilation

* Use kotlinx browser artifact

* Fix missed detekt violations

* Update VICE

* Enable KLIB cross compilation

* Workaround for KSP not supporting klib cross compilation

  - // google/ksp#2243

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Eliezer Graber <[email protected]>
  • Loading branch information
renovate[bot] and eygraber authored Nov 27, 2024
1 parent 5ad20d1 commit 6cc53fe
Show file tree
Hide file tree
Showing 47 changed files with 491 additions and 575 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/pr-package-lock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Upgrade Package Lock

on:
pull_request

jobs:
upgrade_package_lock:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.PUSH_PAT }}

- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version-file: .ci-java-version

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: wrapper

- name: Run assemble task
run: ./gradlew kotlinUpgradePackageLock --rerun-tasks

- name: Commit package lock changes
id: commit_package_lock_changes
uses: EndBug/add-and-commit@v9
with:
add: "['kotlin-js-store/package-lock.json']"
default_author: github_actions
message: "Upgrade package lock"

env:
GRADLE_OPTS: -Dorg.gradle.daemon=false -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx16g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:MaxMetaspaceSize=1024m"
30 changes: 19 additions & 11 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

assemble:
runs-on: macos-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

Expand All @@ -30,10 +30,10 @@ jobs:
gradle-version: wrapper

- name: Run assemble task
run: ./gradlew assemble -x assembleRelease -x jsBrowserProductionWebpack -x wasmJsBrowserProductionWebpack -x compileProductionExecutableKotlinWasmJs -x linkReleaseFrameworkIosArm64 -x linkReleaseFrameworkIosX64 -x linkReleaseFrameworkIosFat -x linkReleaseFrameworkIosSimulatorArm64
run: ./gradlew assemble -x assembleRelease -x jsBrowserProductionWebpack -x wasmJsBrowserProductionWebpack -x compileProductionExecutableKotlinWasmJs

detekt:
runs-on: ubuntu-latest
assemble-ios-frameworks:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

Expand All @@ -47,11 +47,11 @@ jobs:
with:
gradle-version: wrapper

- name: Run detekt
run: ./gradlew detektAll
- name: Assemble sample ios frameworks
run: ./gradlew :samples:auth:ios-framework:assemble :samples:todo:ios-framework:assemble -x linkReleaseFrameworkIosArm64 -x linkReleaseFrameworkIosX64 -x linkReleaseFrameworkIosFat -x linkReleaseFrameworkIosSimulatorArm64

detekt-apple:
runs-on: macos-latest
detekt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

Expand All @@ -65,8 +65,8 @@ jobs:
with:
gradle-version: wrapper

- name: Run detekt for apple targets
run: ./gradlew detektAppleMain detektAppleTest
- name: Run detekt
run: ./gradlew detektAll

dependency_analysis:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -113,7 +113,10 @@ jobs:
run: ./gradlew lintRelease

test:
runs-on: macos-latest
strategy:
matrix:
os: [ macos-latest, ubuntu-latest ]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4

Expand All @@ -129,6 +132,11 @@ jobs:

- name: Run tests
run: ./gradlew allTests
if: matrix.os == 'ubuntu-latest'

- name: Run Apple tests
run: ./gradlew iosX64Test
if: matrix.os == 'macos-latest'

env:
GRADLE_OPTS: -Dorg.gradle.daemon=false -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx16g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:MaxMetaspaceSize=1024m"
24 changes: 1 addition & 23 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:

jobs:
publish_artifacts:
runs-on: macos-latest
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -42,28 +42,6 @@ jobs:
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ARTIFACT_SIGNING_PRIVATE_KEY }}
run: ./gradlew publishAllPublicationsToMavenCentralRepository -Pversion=${{ env.RELEASE_VERSION }}

publish_release:
needs: publish_artifacts

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.PUSH_PAT }}

- name: Generate versions
uses: HardNorth/github-version-generate@v1
with:
version-source: file
version-file: ${{ env.VERSION_FILE }}
version-file-extraction-pattern: ${{ env.VERSION_EXTRACT_PATTERN }}

- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version-file: .ci-java-version

- name: Create, checkout, and push release branch
run: |
git config user.name eygraber
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_snapshot_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
publish_snapshot:
runs-on: macos-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ org.gradle.configuration-cache=false
org.gradle.configureondemand=false

#Kotlin
kotlin.incremental.wasm=true
kotlin.js.yarn=false
kotlin.mpp.androidGradlePluginCompatibility.nowarn=true
kotlin.native.enableKlibsCrossCompilation=true
kotlin.native.ignoreDisabledTargets=true

kotlinx.atomicfu.enableJvmIrTransformation=true
Expand Down
9 changes: 5 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ atomicfu = "0.26.0"

composeJetbrains = "1.7.1"

conventions = "0.0.79"
conventions = "0.0.81"

cryptoKmp = "0.4.0"

Expand All @@ -23,21 +23,21 @@ detektEygraber = "1.0.11"

indexedDb = "0.0.1"

kotlin = "2.0.20"
kotlin = "2.1.0"

kotlinInject = "0.7.2"

kotlinx-coroutines = "1.9.0"
kotlinx-serialization = "1.7.3"
kotlinx-datetime = "0.6.1"

ksp = "2.0.20-1.0.25"
ksp = "2.1.0-1.0.28"

kstore = "0.9.1"

ktlint = "1.4.1"

vice = "0.9.4"
vice = "0.9.5"

[plugins]
atomicfu = { id = "org.jetbrains.kotlinx.atomicfu", version.ref = "atomicfu" }
Expand Down Expand Up @@ -91,6 +91,7 @@ kotlinx-io = "org.jetbrains.kotlinx:kotlinx-io-core:0.6.0"
kotlinx-serialization-cbor = { module = "org.jetbrains.kotlinx:kotlinx-serialization-cbor", version.ref = "kotlinx-serialization" }
kotlinx-serialization-core = { module = "org.jetbrains.kotlinx:kotlinx-serialization-core", version.ref = "kotlinx-serialization" }
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization" }
kotlinx-wasm-browser = "org.jetbrains.kotlinx:kotlinx-browser:0.3"

kotlinInject-compiler = { module = "me.tatarka.inject:kotlin-inject-compiler-ksp", version.ref = "kotlinInject" }
kotlinInject-runtime = { module = "me.tatarka.inject:kotlin-inject-runtime", version.ref = "kotlinInject" }
Expand Down
Loading

0 comments on commit 6cc53fe

Please sign in to comment.