Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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")

Expand All @@ -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
}
Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ org.gradle.vfs.watch = false

# Other properties
name = TheBase
group = com.github.server-utilities
group = com.github.server-utilities
version = 1.0-SNAPSHOT
4 changes: 3 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
rootProject.name = properties['name']
String artifact = System.getenv('ARTIFACT') ?: properties['name']

rootProject.name = artifact
Loading