Skip to content

Commit

Permalink
Add native targets (#14)
Browse files Browse the repository at this point in the history
* add gradle template to gitignore

* kotlin, assertk, and gradle updates

* add native targets

* use new memory model
  • Loading branch information
luca992 authored May 17, 2023
1 parent 35d1e31 commit fe8e8ed
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 4 deletions.
19 changes: 18 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
build/
out/
.idea
local.properties
local.properties

### Gradle template
.gradle
**/build/
!src/**/build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle/wrapper/gradle-wrapper.jar

# Cache of project
.gradletasknamecache

# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
object Versions {
const val jacocoPlugin = "0.8.5"
const val assertk = "0.24"
const val assertk = "0.25"
}
11 changes: 11 additions & 0 deletions buildSrc/src/main/kotlin/mpp-module.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ plugins {
id("maven-publish")
}

val nativeTargets = arrayOf(
"linuxX64",
"macosX64", "macosArm64",
"iosArm32", "iosArm64", "iosX64", "iosSimulatorArm64",
"tvosArm64", "tvosX64", "tvosSimulatorArm64",
"watchosArm32", "watchosArm64", "watchosX86", "watchosX64", "watchosSimulatorArm64",
)

kotlin {
explicitApi()
targets {
Expand Down Expand Up @@ -40,6 +48,9 @@ kotlin {
}
}
}
for (target in nativeTargets) {
targets.add(presets.getByName(target).createTarget(target))
}
}

sourceSets {
Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ kotlin.incremental=true
kotlin.mpp.enableGranularSourceSetsMetadata=true
kotlin.mpp.stability.nowarn=true
kotlin.native.enableDependencyPropagation=false
kotlin.native.binary.memoryModel=experimental

## Kapt Build Settings

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

## Kotlin Gradle Plugin

kgp=1.5.10
kgp=1.6.21

## Gradle Plugins

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit fe8e8ed

Please sign in to comment.