Skip to content

Commit

Permalink
Revert "Migrate to the cthing-versioning plugin."
Browse files Browse the repository at this point in the history
This reverts commit e5e481f.
  • Loading branch information
baron1405 committed May 31, 2024
1 parent e5e481f commit b828979
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
19 changes: 7 additions & 12 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,33 +1,29 @@
import com.github.spotbugs.snom.Confidence
import com.github.spotbugs.snom.Effort
import org.cthing.projectversion.BuildType
import org.cthing.projectversion.ProjectVersion
import java.text.SimpleDateFormat
import java.util.*

repositories {
mavenCentral()
}

buildscript {
repositories {
mavenCentral()
}
}

plugins {
`java-library`
checkstyle
jacoco
`maven-publish`
signing
alias(libs.plugins.cthingVersioning)
alias(libs.plugins.dependencyAnalysis)
alias(libs.plugins.spotbugs)
alias(libs.plugins.versions)
}

version = ProjectVersion("1.0.1", BuildType.snapshot)
val baseVersion = "1.0.1"
val isSnapshot = true

val isCIServer = System.getenv("CTHING_CI") != null
val buildNumber = if (isCIServer) System.currentTimeMillis().toString() else "0"
version = if (isSnapshot) "$baseVersion-$buildNumber" else baseVersion
group = "org.cthing"
description = "A version object for C Thing Software projects."

Expand Down Expand Up @@ -212,8 +208,7 @@ publishing {
}
}

val repoUrl = if ((version as ProjectVersion).isSnapshotBuild)
findProperty("cthing.nexus.snapshotsUrl") else findProperty("cthing.nexus.candidatesUrl")
val repoUrl = if (isSnapshot) findProperty("cthing.nexus.snapshotsUrl") else findProperty("cthing.nexus.candidatesUrl")
if (repoUrl != null) {
repositories {
maven {
Expand Down
1 change: 0 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ junit = "5.10.2"
spotbugs = "4.8.5"

[plugins]
cthingVersioning = { id = "org.cthing.cthing-versioning", version = "1.0.0" }
dependencyAnalysis = { id = "com.autonomousapps.dependency-analysis", version = "1.32.0" }
spotbugs = { id = "com.github.spotbugs", version = "6.0.15" }
versions = { id = "com.github.ben-manes.versions", version = "0.51.0" }
Expand Down

0 comments on commit b828979

Please sign in to comment.