Skip to content

Commit

Permalink
Update build
Browse files Browse the repository at this point in the history
  • Loading branch information
sstone committed Aug 20, 2024
1 parent 0bdf53e commit 8520d98
Show file tree
Hide file tree
Showing 8 changed files with 202 additions and 132 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,26 @@ jobs:
os: [ubuntu-latest, macOS-latest]
steps:
- name: Check out
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Cached Konan
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.konan
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-konan-
- name: Cached Gradle
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-gradle-
- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'adopt'
- name: Check
run: ./gradlew check
- name: Publish Linux
Expand Down
24 changes: 17 additions & 7 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,26 @@ jobs:
os: [ubuntu-latest, macOS-latest]
steps:
- name: Check out
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Cached Konan
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.konan
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-konan-
- name: Cached Gradle
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-gradle-
- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'adopt'
- name: Check
run: ./gradlew check
- name: Publish Linux to Maven Local
Expand All @@ -55,10 +56,19 @@ jobs:
run: |
mkdir -p maven-local/snapshot
cp -r ~/.m2/repository/* maven-local/snapshot
- name: Upload artifacts
uses: actions/upload-artifact@v2
- name: Upload linux artifacts
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: snapshot-linux
path: |
maven-local
!maven-local/**/maven-metadata-local.xml
- name: Upload macos artifacts
if: matrix.os == 'macOS-latest'
uses: actions/upload-artifact@v4
with:
name: snapshot
name: snapshot-macos
path: |
maven-local
!maven-local/**/maven-metadata-local.xml
9 changes: 5 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,25 @@ jobs:
os: [ubuntu-latest, macOS-latest]
steps:
- name: Check out
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Cached Konan
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.konan
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-konan-
- name: Cached Gradle
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-gradle-
- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'adopt'
- name: Check
run: ./gradlew check
12 changes: 7 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import org.jetbrains.kotlin.gradle.targets.native.tasks.KotlinNativeHostTest
import org.jetbrains.kotlin.gradle.targets.native.tasks.KotlinNativeSimulatorTest

plugins {
kotlin("multiplatform") version "1.9.22"
id("org.jetbrains.dokka") version "1.9.10"
kotlin("multiplatform") version "1.9.23"
id("org.jetbrains.dokka") version "1.9.20"
`maven-publish`
}

Expand All @@ -24,7 +24,6 @@ kotlin {
explicitApi()

jvm {
withJava()
compilations.all {
kotlinOptions.jvmTarget = "1.8"
}
Expand Down Expand Up @@ -118,7 +117,9 @@ plugins.withId("org.jetbrains.kotlin.multiplatform") {
configure(targets) {
compilations.all {
cinterops.all { tasks[interopProcessingTaskName].enabled = false }
compileKotlinTask.enabled = false
compileTaskProvider.configure {
enabled = false
}
tasks[processResourcesTaskName].enabled = false
}
binaries.all { linkTask.enabled = false }
Expand All @@ -132,7 +133,7 @@ plugins.withId("org.jetbrains.kotlin.multiplatform") {
}
}

val dokkaOutputDir = buildDir.resolve("dokka")
val dokkaOutputDir = layout.buildDirectory.dir("dokka")

tasks.dokkaHtml {
outputDirectory.set(file(dokkaOutputDir))
Expand All @@ -144,6 +145,7 @@ tasks.dokkaHtml {
Platform.native -> "native"
Platform.common -> "common"
Platform.wasm -> "wasm"
else -> error("unexpected platform ${platform.get()}")
}
displayName.set(platformName)

Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionSha256Sum=f6b8596b10cce501591e92f229816aa4046424f3b24d771751b06779d58c8ec4
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 8520d98

Please sign in to comment.