Skip to content

Commit 5e80124

Browse files
committed
Update targets and kotlin
1 parent 23eb52f commit 5e80124

File tree

6 files changed

+337
-350
lines changed

6 files changed

+337
-350
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

.github/workflows/deploy.yml

Lines changed: 32 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,62 @@
11
name: deploy
22
on: workflow_dispatch
3-
#on:
4-
# pull_request:
5-
# branches:
6-
# - main
7-
# push:
8-
# branches:
9-
# - main
103

114
jobs:
12-
build:
13-
strategy:
14-
matrix:
15-
os: [macOS-11, ubuntu-latest]
16-
runs-on: ${{matrix.os}}
5+
deploy:
6+
runs-on: macos-latest
177
steps:
188
- name: Checkout the repo
19-
uses: actions/checkout@v2
9+
uses: actions/checkout@v3
10+
11+
- uses: actions/setup-java@v2
12+
with:
13+
distribution: "adopt"
14+
java-version: "17"
15+
2016
- name: Validate Gradle Wrapper
2117
uses: gradle/wrapper-validation-action@v1
18+
2219
- name: Cache gradle
2320
uses: actions/cache@v2
2421
with:
2522
path: ~/.gradle/caches
2623
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
2724
restore-keys: |
2825
${{ runner.os }}-gradle-
26+
2927
- name: Cache konan
3028
uses: actions/cache@v2
3129
with:
3230
path: ~/.konan
3331
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
3432
restore-keys: |
3533
${{ runner.os }}-gradle-
36-
- name: Publish Mac/Windows Artifacts
37-
if: matrix.os == 'macOS-11'
38-
run: ./gradlew publish --no-daemon --stacktrace
39-
env:
40-
ORG_GRADLE_PROJECT_SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
41-
ORG_GRADLE_PROJECT_SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
42-
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
4334
44-
- name: Publish Linux Artifacts
45-
if: matrix.os == 'ubuntu-latest'
46-
run: ./gradlew publishLinux --no-daemon --stacktrace
35+
- name: Publish Artifacts
36+
run: ./gradlew publish --no-daemon --stacktrace --no-build-cache
4737
env:
4838
ORG_GRADLE_PROJECT_SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
39+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
4940
ORG_GRADLE_PROJECT_SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
41+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
5042
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
43+
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
44+
45+
- uses: touchlab/read-property@main
46+
id: version_name
47+
with:
48+
file: ./gradle.properties
49+
property: VERSION_NAME
50+
51+
- name: Print versionBasePropertyValue
52+
id: output
53+
run: echo "${{ steps.version_name.outputs.propVal }}"
54+
55+
- name: Create Release
56+
if: ${{ contains(steps.version_name.outputs.propVal, 'SNAPSHOT') == false }}
57+
uses: touchlab/[email protected]
58+
with:
59+
tag: ${{ steps.version_name.outputs.propVal }}
5160

5261
env:
5362
GRADLE_OPTS: -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx3g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:MaxMetaspaceSize=512m"

build.gradle.kts

Lines changed: 7 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ import org.jetbrains.kotlin.konan.target.Family.ANDROID
33
import org.jetbrains.kotlin.konan.target.Family.LINUX
44
import org.jetbrains.kotlin.konan.target.Family.MINGW
55

6+
buildscript {
7+
dependencies {
8+
classpath("com.vanniktech:gradle-maven-publish-plugin:0.23.1")
9+
}
10+
}
11+
612
plugins {
713
kotlin("multiplatform")
814
}
@@ -25,18 +31,13 @@ kotlin {
2531
macosX64()
2632
iosX64()
2733
iosArm64()
28-
iosArm32()
2934
watchosArm32()
3035
watchosArm64()
31-
watchosX86()
3236
watchosX64()
3337
tvosArm64()
3438
tvosX64()
3539
mingwX64()
36-
mingwX86()
3740
linuxX64()
38-
linuxArm32Hfp()
39-
linuxMips32()
4041

4142
macosArm64()
4243
iosSimulatorArm64()
@@ -123,35 +124,6 @@ kotlin {
123124
}
124125
}
125126

126-
/* Setup Publications */
127-
128-
/*if (!HostManager.hostIsLinux) {
129-
tasks.findByName("linuxX64Test")?.enabled = false
130-
tasks.findByName("linkDebugTestLinuxX64")?.enabled = false
131-
tasks.findByName("publishLinuxX64PublicationToMavenRepository")?.enabled = false
132-
}*/
133-
134-
apply(from = "gradle/gradle-mvn-mpp-push.gradle")
135-
136-
/*
137-
tasks.register("publishMac") {
138-
setDependsOn(tasks.filter { t ->
139-
t.name.startsWith("publish") && t.name.endsWith("ToMavenRepository") && !t.name.contains(
140-
"Linux"
141-
)
142-
}.map { it.name })
143-
}
144-
*/
145-
146-
tasks.register("publishWindows") {
147-
if (project.tasks.findByName("publish") != null) {
148-
setDependsOn(listOf(
149-
"publishMingwX86PublicationToMavenRepository",
150-
"publishMingwX64PublicationToMavenRepository"
151-
))
152-
}
153-
}
154-
155127
tasks.register("publishLinux") {
156128
if (project.tasks.findByName("publish") != null) {
157129
setDependsOn(listOf(
@@ -160,9 +132,4 @@ tasks.register("publishLinux") {
160132
}
161133
}
162134

163-
/*
164-
tasks.register('publishLinux') {
165-
if(project.tasks.findByName('publish')) {
166-
dependsOn 'publishLinuxMips32PublicationToMavenRepository'
167-
}
168-
}*/
135+
apply(plugin = "com.vanniktech.maven.publish")

gradle.properties

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,18 @@
1515
#
1616
kotlin.code.style=official
1717
GROUP=co.touchlab
18-
VERSION_NAME=0.6.5
19-
KOTLIN_VERSION=1.8.10
20-
POM_URL=https://github.com/touchlab/TestHelp
21-
POM_DESCRIPTION=Kotlin Multiplatform Test Help
22-
POM_NAME=KMP Test Help
18+
VERSION_NAME=0.6.6
19+
KOTLIN_VERSION=1.9.10
20+
2321
POM_ARTIFACT_ID=testhelp
22+
23+
POM_NAME=KMP Test Help
24+
POM_DESCRIPTION=Kotlin Multiplatform Test Help
25+
POM_URL=https://github.com/touchlab/TestHelp
2426
POM_SCM_URL=https://github.com/touchlab/TestHelp
2527
POM_SCM_CONNECTION=scm:git:git://github.com/touchlab/TestHelp.git
2628
POM_SCM_DEV_CONNECTION=scm:git:git://github.com/touchlab/TestHelp.git
29+
2730
POM_LICENCE_NAME=The Apache Software License, Version 2.0
2831
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
2932
POM_LICENCE_DIST=repo
@@ -33,8 +36,4 @@ POM_DEVELOPER_NAME=Kevin Galligan
3336
POM_DEVELOPER_ORG=Kevin Galligan
3437
POM_DEVELOPER_URL=https://touchlab.co/
3538

36-
kotlin.js.compiler=both
37-
38-
kotlin.mpp.enableGranularSourceSetsMetadata=true
39-
kotlin.native.enableDependencyPropagation=false
40-
kotlin.mpp.commonizerLogLevel=info
39+
kotlin.js.ir.output.granularity=whole-program

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616

1717
distributionBase=GRADLE_USER_HOME
1818
distributionPath=wrapper/dists
19-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
19+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
2020
zipStoreBase=GRADLE_USER_HOME
2121
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)