Skip to content

Commit

Permalink
Revert to original parent build file
Browse files Browse the repository at this point in the history
  • Loading branch information
scroix committed Apr 6, 2024
1 parent 128dbe2 commit e74f409
Showing 1 changed file with 1 addition and 38 deletions.
39 changes: 1 addition & 38 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,45 +1,8 @@
import org.joda.time.DateTime

buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'joda-time:joda-time:2.10.10'
}
}

ext {
getGitInfo = {
return [
branch : 'git rev-parse --abbrev-ref HEAD'.execute().text.trim(),
id : 'git rev-parse HEAD'.execute().text.trim(),
rev : 'git rev-list --count HEAD'.execute().text.trim(),
origin : 'git config --get remote.origin.url'.execute().text.trim()
]
}

gitInfo = getGitInfo()
buildSummary = gitInfo.id
hostname = InetAddress.getLocalHost().getHostName().toUpperCase()
now = DateTime.now().toString()
rev = gitInfo.rev.replaceAll(/[^a-zA-Z0-9]/, '')

branch = gitInfo.branch
if (branch == 'master') {
branch = 'dev'
} else if (branch.contains('/')) {
branch = branch.substring(branch.indexOf('/') + 1)
}

version = gitInfo.branch != 'stable' ? "${project.version}-${branch}_r${rev}" : project.version
}

subprojects {
apply plugin: 'java'
group = 'org.nodel'
version = '2.2.1'
repositories {
mavenCentral()
}
}
}

0 comments on commit e74f409

Please sign in to comment.