Skip to content

Commit

Permalink
Pick version from VERSION file
Browse files Browse the repository at this point in the history
  • Loading branch information
ar committed May 2, 2022
1 parent c444b08 commit 632d803
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PROJECT_VERSION="3.0.0-SNAPSHOT"
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import org.gradle.internal.os.OperatingSystem
apply from: 'jpos/libraries.gradle'

evaluate(new File("${project.projectDir}/VERSION"))

allprojects {
apply plugin: 'idea'
apply plugin: 'eclipse'
Expand All @@ -15,7 +17,7 @@ subprojects {
apply plugin: 'project-report'

group = 'org.jpos'
version = '3.0.0-SNAPSHOT'
version = binding.variables.get("PROJECT_VERSION") ?: "0.0.1"
[ compileJava, compileTestJava, javadoc ]*.options*.encoding = 'UTF-8'
def isSnapshot = version.contains("SNAPSHOT")
def mavenCentralRepo = isSnapshot ?
Expand Down

0 comments on commit 632d803

Please sign in to comment.