Skip to content

Commit

Permalink
Update publishing to provide version from the command-line
Browse files Browse the repository at this point in the history
  • Loading branch information
tbroyer committed Jan 24, 2023
1 parent 21afe33 commit 4928310
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 32 deletions.
21 changes: 0 additions & 21 deletions build-logic/src/main/kotlin/VersionFromGit.kt

This file was deleted.

8 changes: 3 additions & 5 deletions build-logic/src/main/kotlin/local/maven-publish.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ plugins {
}

group = "net.ltgt.gradle.incap"
if (project != rootProject) {
version = rootProject.version
}

java {
withJavadocJar()
Expand Down Expand Up @@ -73,7 +70,7 @@ val mavenPublication = createPublication("maven")

tasks.withType<PublishToMavenRepository>().configureEach {
if (repository == sonatypeRepository) {
onlyIf { publication == mavenPublication }
onlyIf { publication == mavenPublication && publication.version != Project.DEFAULT_VERSION }
}
}

Expand All @@ -84,7 +81,8 @@ signing {
}

inline val Project.isSnapshot
get() = version.toString().endsWith("-SNAPSHOT")
get() = version.toString().endsWith("-SNAPSHOT") || version == Project.DEFAULT_VERSION

//
// For integration tests
//
Expand Down
6 changes: 0 additions & 6 deletions build.gradle.kts

This file was deleted.

0 comments on commit 4928310

Please sign in to comment.