Skip to content

Commit

Permalink
Update dependenices & gradle, add linuxArm64 native target (#18)
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

* kotlin 1.8.21, update dependenices & gradle

* remove depreciated native targets, add linuxArm64

* fix jvm version
  • Loading branch information
luca992 authored May 17, 2023
1 parent 91c8906 commit 4745e0c
Show file tree
Hide file tree
Showing 8 changed files with 269 additions and 225 deletions.
4 changes: 2 additions & 2 deletions 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.25"
const val jacocoPlugin = "0.8.8"
const val assertk = "0.26"
}
20 changes: 12 additions & 8 deletions buildSrc/src/main/kotlin/mpp-module.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,26 @@ plugins {
id("maven-publish")
}

val nativeTargets = arrayOf(
"linuxX64",
val darwinTargets = arrayOf(
"macosX64", "macosArm64",
"iosArm64", "iosX64", "iosSimulatorArm64",
"tvosArm64", "tvosX64", "tvosSimulatorArm64",
"watchosArm32", "watchosArm64", "watchosX64", "watchosSimulatorArm64",
)
val linuxTargets = arrayOf("linuxX64", "linuxArm64")
val mingwTargets = arrayOf("mingwX64")
val nativeTargets = linuxTargets + darwinTargets + mingwTargets

kotlin {
explicitApi()
targets {
jvm {
withJava() // required for jacoco plugin
compilations.all {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.jvmTarget = "11"
}
}
js(BOTH) {
js(IR) {
compilations {
this.forEach { compilation ->
compilation.compileKotlinTask.kotlinOptions.apply {
Expand Down Expand Up @@ -110,11 +113,12 @@ tasks.withType<JacocoReport> {
executionData
.setFrom(files("${buildDir}/jacoco/jvmTest.exec"))
reports {
xml.isEnabled = true
csv.isEnabled = false
html.isEnabled = true
html.destination =
xml.required.set(true)
csv.required.set(false)
html.required.set(true)
html.outputLocation.set(
File("${buildDir}/jacoco-reports/html")
)
}
}

Expand Down
11 changes: 1 addition & 10 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,12 @@ org.gradle.vfs.watch=true

kotlin.code.style=official
kotlin.incremental=true
kotlin.mpp.enableGranularSourceSetsMetadata=true
kotlin.mpp.stability.nowarn=true
kotlin.native.enableDependencyPropagation=false
kotlin.native.binary.memoryModel=experimental

## Kapt Build Settings

kapt.include.compile.classpath=false
kapt.incremental.apt=true
kapt.use.worker.api=true

## Kotlin Gradle Plugin

kgp=1.8.21

## Gradle Plugins

plugin.com.github.ben-manes.versions=0.38.0
plugin.com.github.ben-manes.versions=0.46.0
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
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.4.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 4745e0c

Please sign in to comment.