Skip to content

Commit fe8e8ed

Browse files
authored
Add native targets (#14)
* add gradle template to gitignore * kotlin, assertk, and gradle updates * add native targets * use new memory model
1 parent 35d1e31 commit fe8e8ed

File tree

5 files changed

+33
-4
lines changed

5 files changed

+33
-4
lines changed

.gitignore

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
11
build/
22
out/
33
.idea
4-
local.properties
4+
local.properties
5+
6+
### Gradle template
7+
.gradle
8+
**/build/
9+
!src/**/build/
10+
11+
# Ignore Gradle GUI config
12+
gradle-app.setting
13+
14+
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
15+
!gradle/wrapper/gradle-wrapper.jar
16+
17+
# Cache of project
18+
.gradletasknamecache
19+
20+
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
21+
# gradle/wrapper/gradle-wrapper.properties
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
object Versions {
22
const val jacocoPlugin = "0.8.5"
3-
const val assertk = "0.24"
3+
const val assertk = "0.25"
44
}

buildSrc/src/main/kotlin/mpp-module.gradle.kts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ plugins {
1111
id("maven-publish")
1212
}
1313

14+
val nativeTargets = arrayOf(
15+
"linuxX64",
16+
"macosX64", "macosArm64",
17+
"iosArm32", "iosArm64", "iosX64", "iosSimulatorArm64",
18+
"tvosArm64", "tvosX64", "tvosSimulatorArm64",
19+
"watchosArm32", "watchosArm64", "watchosX86", "watchosX64", "watchosSimulatorArm64",
20+
)
21+
1422
kotlin {
1523
explicitApi()
1624
targets {
@@ -40,6 +48,9 @@ kotlin {
4048
}
4149
}
4250
}
51+
for (target in nativeTargets) {
52+
targets.add(presets.getByName(target).createTarget(target))
53+
}
4354
}
4455

4556
sourceSets {

gradle.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ kotlin.incremental=true
1515
kotlin.mpp.enableGranularSourceSetsMetadata=true
1616
kotlin.mpp.stability.nowarn=true
1717
kotlin.native.enableDependencyPropagation=false
18+
kotlin.native.binary.memoryModel=experimental
1819

1920
## Kapt Build Settings
2021

@@ -24,7 +25,7 @@ kapt.use.worker.api=true
2425

2526
## Kotlin Gradle Plugin
2627

27-
kgp=1.5.10
28+
kgp=1.6.21
2829

2930
## Gradle Plugins
3031

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)