Skip to content

Commit

Permalink
Minimal set of targets on standard build, full in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
deusaquilus committed Feb 4, 2024
1 parent 7a431e7 commit 5f7bf1d
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 11 deletions.
7 changes: 6 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,14 @@ subprojects {
}
}

val isCI = project.hasProperty("isCI")
val isLocal = !isCI
val noSign = project.hasProperty("nosign")
val doNotSign = isLocal || noSign

signing {
// Sign if we're not doing a local build and we haven't specifically disabled it
if (!project.hasProperty("local") && !project.hasProperty("nosign")) {
if (!doNotSign) {
val signingKeyRaw = System.getenv("NEW_SIGNING_KEY_ID_BASE64")
if (signingKeyRaw == null) error("ERROR: No Signing Key Found")
// Seems like the right way was to have newlines after all the exported (ascii armored) lines
Expand Down
24 changes: 19 additions & 5 deletions pprint-kotlin-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,23 @@ kotlin {
val isMac = platform == "mac"
val isWindows = platform == "windows"

if (isLinux || !isCI) {
// If we're not the CI build a limited set of standard targets
if(!isCI) {
jvm {
jvmToolchain(11)
}
js {
browser()
nodejs()
}

linuxX64()
macosX64()
mingwX64()
}

// If we are a CI, build all the targets for the specified platform
if (isLinux && isCI) {
jvm {
jvmToolchain(11)
}
Expand All @@ -43,8 +59,7 @@ kotlin {
androidNativeArm32()
androidNativeArm64()
}

if (isMac || !isCI) {
if (isMac && isCI) {
macosX64()
macosArm64()
iosX64()
Expand All @@ -56,8 +71,7 @@ kotlin {
watchosArm32()
watchosArm64()
}

if (isWindows || !isCI) {
if (isWindows && isCI) {
mingwX64()
}

Expand Down
24 changes: 19 additions & 5 deletions pprint-kotlin-kmp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,23 @@ kotlin {
val isMac = platform == "mac"
val isWindows = platform == "windows"

if (isLinux || !isCI) {
// If we're not the CI build a limited set of standard targets
if(!isCI) {
jvm {
jvmToolchain(11)
}
js {
browser()
nodejs()
}

linuxX64()
macosX64()
mingwX64()
}

// If we are a CI, build all the targets for the specified platform
if (isLinux && isCI) {
jvm {
jvmToolchain(11)
}
Expand All @@ -44,8 +60,7 @@ kotlin {
androidNativeArm32()
androidNativeArm64()
}

if (isMac || !isCI) {
if (isMac && isCI) {
macosX64()
macosArm64()
iosX64()
Expand All @@ -57,8 +72,7 @@ kotlin {
watchosArm32()
watchosArm64()
}

if (isWindows || !isCI) {
if (isWindows && isCI) {
mingwX64()
}

Expand Down

0 comments on commit 5f7bf1d

Please sign in to comment.