diff --git a/build.gradle.kts b/build.gradle.kts index 981927b..ffb815c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -10,26 +10,24 @@ repositories { mavenCentral() } +buildscript { + repositories { + mavenCentral() + } +} + plugins { `java-gradle-plugin` checkstyle jacoco signing + alias(libs.plugins.cthingVersioning) alias(libs.plugins.dependencyAnalysis) alias(libs.plugins.pluginPublish) alias(libs.plugins.spotbugs) alias(libs.plugins.versions) } -buildscript { - repositories { - mavenCentral() - } - dependencies { - classpath(libs.cthingProjectVersion) - } -} - version = ProjectVersion("1.0.1", BuildType.snapshot) group = "org.cthing" description = "A Gradle plugin that generates a Java source file with constants for keys in properties files." @@ -145,9 +143,6 @@ tasks { publishPlugins { doFirst { - if ((version as ProjectVersion).isSnapshotBuild) { - throw GradleException("Cannot publish a developer build to the Gradle Plugin Portal") - } if (!project.hasProperty("gradle.publish.key") || !project.hasProperty("gradle.publish.secret")) { throw GradleException("Gradle Plugin Portal credentials not defined") } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 730e19a..0bba18a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -6,6 +6,7 @@ junit = "5.10.2" spotbugs = "4.8.4" [plugins] +cthingVersioning = { id = "org.cthing.cthing-versioning", version = "1.0.0" } dependencyAnalysis = { id = "com.autonomousapps.dependency-analysis", version = "1.31.0" } pluginPublish = { id = "com.gradle.plugin-publish", version = "1.2.1" } spotbugs = { id = "com.github.spotbugs", version = "6.0.12" } @@ -15,7 +16,6 @@ versions = { id = "com.github.ben-manes.versions", version = "0.51.0" } assertJ = "org.assertj:assertj-core:3.25.3" commonsIO = "commons-io:commons-io:2.16.1" cthingAnnots = "org.cthing:cthing-annotations:1.0.0" -cthingProjectVersion = "org.cthing:cthing-projectversion:1.0.0" junitApi = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit" } junitEngine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junit" } junitLauncher = "org.junit.platform:junit-platform-launcher:1.10.2"