Skip to content

Commit

Permalink
feat: add isJitpackEnv util; fix build?
Browse files Browse the repository at this point in the history
* rollback publish-conventions change in 201c6a7
* i think jitpack wants the jar task outputs, so i'll un-disable them
  • Loading branch information
ms5984 committed Dec 1, 2023
1 parent 201c6a7 commit 1ffd099
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 0 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ plugins {
id("com.github.johnrengelman.shadow")
}

tasks.jar {
enabled = false
}

dependencies {
implementation(project(getSubproject("api")))
// implementation(project(getSubproject("cli")))
Expand Down
10 changes: 9 additions & 1 deletion buildSrc/src/main/kotlin/Extensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,12 @@ fun Project.setMavenName(name: String) {
}
}
}
}
}

/**
* Detects whether we are building on Jitpack.
*
* @return true if we are building on Jitpack
*/
val isJitpackEnv: Boolean
get() = System.getenv("JITPACK") == "true"
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ tasks.withType<Javadoc> {

afterEvaluate {
publishing {
val publicationName = if (System.getenv("JITPACK") != "true") name else "mavenJava"
val publicationName = name
publications.create<MavenPublication>(publicationName) {
pom {
name.set("Clans")
Expand Down
4 changes: 0 additions & 4 deletions cli/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ dependencies {
implementation("com.github.Revxrsal.Lamp:bukkit:$lampVersion")
}

tasks.jar {
enabled = false
}

tasks.withType<JavaCompile> { // Preserve parameter names in the bytecode
options.compilerArgs.add("-parameters")
}
Expand Down

0 comments on commit 1ffd099

Please sign in to comment.