diff --git a/build.gradle b/build.gradle index adc1a46..8a9bd2d 100644 --- a/build.gradle +++ b/build.gradle @@ -5,6 +5,12 @@ plugins { id 'maven-publish' // for jitpack.io } +String group = System.getenv('GROUP') ?: properties['group'] +String version = System.getenv('VERSION') ?: properties['version'] + +rootProject.group = group +rootProject.version = version + repositories { mavenCentral() mavenLocal() @@ -70,7 +76,7 @@ artifacts { archives shadowJar } -tasks.register('copyToDeployDir', Copy) { +tasks.register('deploy', Copy) { // Define the deployment directory def deployDir = file(System.getenv("DEPLOY_DIR") ?: "$rootDir/deploy") @@ -87,9 +93,9 @@ tasks.register('copyToDeployDir', Copy) { } // Ensure that the copyToDeployDir task runs after the shadowJar task -shadowJar.finalizedBy(copyToDeployDir) +shadowJar.finalizedBy(deploy) -tasks.named('copyToDeployDir').configure { +tasks.named('deploy').configure { dependsOn shadowJar dependsOn jar } diff --git a/gradle.properties b/gradle.properties index 691a820..11d3301 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,4 +8,5 @@ org.gradle.vfs.watch = false # Other properties name = TheBase -group = com.github.server-utilities \ No newline at end of file +group = com.github.server-utilities +version = 1.0-SNAPSHOT \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 851e16f..09eb9f5 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1,3 @@ -rootProject.name = properties['name'] \ No newline at end of file +String artifact = System.getenv('ARTIFACT') ?: properties['name'] + +rootProject.name = artifact \ No newline at end of file