-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#31] Configure multiplatform build scripts
- Loading branch information
1 parent
3f24445
commit 8fc703a
Showing
10 changed files
with
155 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3f24445329869fd19b9ea3fe72d97aefa768ea0a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
buildscript { | ||
dependencyLocking { | ||
lockAllConfigurations() | ||
} | ||
} | ||
|
||
dependencyLocking { | ||
lockAllConfigurations() | ||
} | ||
|
||
// Per conversation in the KotlinLang Slack, Gradle uses Java 8 compatibility internally | ||
// for all build scripts. | ||
// https://kotlinlang.slack.com/archives/C19FD9681/p1636632870122900?thread_ts=1636572288.117000&cid=C19FD9681 | ||
java { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
|
||
dependencies { | ||
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:${libs.versions.kotlin.get()}") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# This is a Gradle generated file for dependency locking. | ||
# Manual edits can break the build and are not advised. | ||
# This file is expected to be part of source control. | ||
com.github.gundy:semver4j:0.16.4=classpath | ||
com.google.code.findbugs:jsr305:3.0.2=classpath | ||
com.google.code.gson:gson:2.8.6=classpath | ||
com.google.errorprone:error_prone_annotations:2.3.4=classpath | ||
com.google.guava:failureaccess:1.0.1=classpath | ||
com.google.guava:guava:29.0-jre=classpath | ||
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=classpath | ||
com.google.j2objc:j2objc-annotations:1.3=classpath | ||
de.undercouch:gradle-download-task:4.1.1=classpath | ||
org.checkerframework:checker-qual:2.11.1=classpath | ||
org.gradle.kotlin.kotlin-dsl:org.gradle.kotlin.kotlin-dsl.gradle.plugin:2.1.7=classpath | ||
org.gradle.kotlin:gradle-kotlin-dsl-plugins:2.1.7=classpath | ||
org.jetbrains.intellij.deps:trove4j:1.0.20181211=classpath | ||
org.jetbrains.kotlin:kotlin-android-extensions:1.5.31=classpath | ||
org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.5.31=classpath | ||
org.jetbrains.kotlin:kotlin-build-common:1.5.31=classpath | ||
org.jetbrains.kotlin:kotlin-compiler-embeddable:1.5.31=classpath | ||
org.jetbrains.kotlin:kotlin-compiler-runner:1.5.31=classpath | ||
org.jetbrains.kotlin:kotlin-daemon-client:1.5.31=classpath | ||
org.jetbrains.kotlin:kotlin-daemon-embeddable:1.5.31=classpath | ||
org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.5.31=classpath | ||
org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.5.31=classpath | ||
org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31=classpath | ||
org.jetbrains.kotlin:kotlin-klib-commonizer-api:1.5.31=classpath | ||
org.jetbrains.kotlin:kotlin-native-utils:1.5.31=classpath | ||
org.jetbrains.kotlin:kotlin-project-model:1.5.31=classpath | ||
org.jetbrains.kotlin:kotlin-sam-with-receiver:1.5.31=classpath | ||
org.jetbrains.kotlin:kotlin-scripting-common:1.5.31=classpath | ||
org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.5.31=classpath | ||
org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.5.31=classpath | ||
org.jetbrains.kotlin:kotlin-scripting-jvm:1.5.31=classpath | ||
org.jetbrains.kotlin:kotlin-stdlib-common:1.5.31=classpath | ||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.31=classpath | ||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31=classpath | ||
org.jetbrains.kotlin:kotlin-stdlib:1.5.31=classpath | ||
org.jetbrains.kotlin:kotlin-tooling-metadata:1.5.31=classpath | ||
org.jetbrains.kotlin:kotlin-util-io:1.5.31=classpath | ||
org.jetbrains.kotlin:kotlin-util-klib:1.5.31=classpath | ||
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.0=classpath | ||
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0=classpath | ||
org.jetbrains:annotations:13.0=classpath | ||
empty= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
@Suppress("UnstableApiUsage") | ||
dependencyResolutionManagement { | ||
repositories { | ||
mavenCentral() | ||
} | ||
dependencyResolutionManagement { | ||
versionCatalogs { | ||
create("libs") { | ||
from(files("../gradle/libs.versions.toml")) | ||
} | ||
} | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
build-conventions/src/main/kotlin/bip39.kotlin-multiplatform-conventions.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import org.gradle.jvm.toolchain.JavaToolchainSpec | ||
|
||
pluginManager.withPlugin("org.jetbrains.kotlin.multiplatform") { | ||
extensions.findByType<org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension>()?.apply { | ||
jvmToolchain { | ||
val javaVersion = JavaVersion.toVersion(project.property("JVM_TOOLCHAIN").toString()) | ||
val javaLanguageVersion = JavaLanguageVersion.of(javaVersion.majorVersion) | ||
(this as JavaToolchainSpec).languageVersion.set(javaLanguageVersion) | ||
} | ||
|
||
targets.matching { it.platformType.name == "jvm" }.all { | ||
(this as org.jetbrains.kotlin.gradle.targets.jvm.KotlinJvmTarget).apply { | ||
val javaTargetVersion = project.property("JVM_TARGET").toString() | ||
|
||
compilations.all { | ||
kotlinOptions { | ||
jvmTarget = javaTargetVersion | ||
} | ||
} | ||
} | ||
} | ||
|
||
targets.all { | ||
compilations.all { | ||
kotlinOptions { | ||
allWarningsAsErrors = project.property("BIP39_IS_TREAT_WARNINGS_AS_ERRORS").toString().toBoolean() | ||
freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlin.RequiresOptIn" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# This is a Gradle generated file for dependency locking. | ||
# Manual edits can break the build and are not advised. | ||
# This file is expected to be part of source control. | ||
empty=incomingCatalogForLibs0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters