Skip to content

Commit

Permalink
build.gradle: version 2.5.0 (release), add objectboxVersionNumber and…
Browse files Browse the repository at this point in the history
… objectboxVersionRelease to simplify release process
  • Loading branch information
greenrobot committed Dec 12, 2019
1 parent 61d5f8b commit c508135
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,21 @@ version = ob_version

buildscript {
ext {
// Typically, only edit those two:
def objectboxVersionNumber = '2.5.0' // without "-SNAPSHOT", e.g. '2.5.0' or '2.4.0-RC'
def objectboxVersionRelease = true // set to true for releasing to ignore versionPostFix to avoid e.g. "-dev" versions

// version post fix: '-<value>' or '' if not defined; e.g. used by CI to pass in branch name
def versionPostFixValue = project.findProperty('versionPostFix')
def versionPostFix = versionPostFixValue ? "-$versionPostFixValue" : ''
ob_version = "2.5.0$versionPostFix-SNAPSHOT"
ob_version = objectboxVersionNumber + (objectboxVersionRelease? "" : "$versionPostFix-SNAPSHOT")
println "ObjectBox Java version $ob_version"

ob_expected_version = project.hasProperty('expectedVersion') ? project.property('expectedVersion') : 'UNDEFINED'

// Core version for tests
// Be careful to diverge here; easy to forget and hard to find JNI problems
ob_native_version = "2.5.0-dev-SNAPSHOT"
ob_native_version = objectboxVersionNumber + (objectboxVersionRelease? "": "-dev-SNAPSHOT")

def osName = System.getProperty("os.name").toLowerCase()
objectboxPlatform = osName.contains('linux') ? 'linux'
Expand Down

0 comments on commit c508135

Please sign in to comment.