Skip to content

Commit

Permalink
Scripts with GrabVer 0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
davideas committed Jul 27, 2017
1 parent 5a7aa1d commit 711858d
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 17 deletions.
5 changes: 2 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ ext {

// Library Repository
libraryName = "FlexibleAdapter"
libraryCode = 20
libraryVersion = "5.0.0-rc2"
libraryDate = " built on " + getDate()
bintrayRepo = "maven"
packageExt = "aar"
siteUrl = "https://github.com/davideas/FlexibleAdapter"
Expand Down Expand Up @@ -56,6 +53,7 @@ if (JavaVersion.current().isJava8Compatible()) {
buildscript {
repositories {
jcenter()
maven {url "http://dl.bintray.com/davideas/maven"}
maven {url "https://oss.sonatype.org/content/repositories/snapshots/" }
}

Expand All @@ -66,6 +64,7 @@ buildscript {
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3"
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:3.1.1"
classpath "com.vanniktech:gradle-android-javadoc-plugin:0.2.1"
classpath "eu.davidea:grabver:0.3.0"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
15 changes: 11 additions & 4 deletions flexible-adapter-app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
apply plugin: 'com.android.application'
apply plugin: 'eu.davidea.grabver'

versioning {
major 5
minor 0
preRelease "SNAPSHOT"
}

android {
compileSdkVersion targetSdk
Expand All @@ -8,22 +15,22 @@ android {
applicationId 'eu.davidea.samples.flexibleadapter'
minSdkVersion minSdk
targetSdkVersion targetSdk
versionCode libraryCode
versionName libraryVersion + libraryDate
versionCode versioning.code
versionName versioning.name

testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'

applicationVariants.all { variant ->
variant.outputs.each { output ->
def file = output.outputFile
def fileName = 'flexible-adapter-v' + libraryVersion + '-c' + versionCode + '.apk'
def fileName = 'flexible-adapter-v' + versioning.name + '-c' + versioning.code + '.apk'
output.outputFile = new File(file.parentFile, fileName)
}
}
}
buildTypes {
debug {
versionNameSuffix ' #' + libraryCode + libraryDate
versionNameSuffix ' #' + versioning.build + versioning.builtOn
minifyEnabled false
}
release {
Expand Down
7 changes: 7 additions & 0 deletions flexible-adapter-app/version.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#Thu Jul 27 17:51:20 CEST 2017
CODE=20
MAJOR=5
PRE_RELEASE=SNAPSHOT
MINOR=0
BUILD=5100
PATCH=0
13 changes: 9 additions & 4 deletions flexible-adapter-databinding/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
apply plugin: 'com.android.library'
apply plugin: 'eu.davidea.grabver'

versioning {
major 1
minor 0
preRelease "b1"
}

ext {
// Library Settings
libraryName = "FlexibleAdapter DataBinding extension"
libraryCode = 1
libraryVersion = "1.0.0-b1"
libraryDescription = "DataBinding extension for FlexibleAdapter project"
libraryLabels = ['android', 'flexibleadapter', 'adapter', 'databinding', 'binding']

Expand All @@ -20,8 +25,8 @@ android {
defaultConfig {
minSdkVersion minSdk
targetSdkVersion targetSdk
versionCode libraryCode
versionName libraryVersion + libraryDate
versionCode versioning.code
versionName versioning.name
}
buildTypes {
release {
Expand Down
7 changes: 7 additions & 0 deletions flexible-adapter-databinding/version.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#Thu Jul 27 17:51:20 CEST 2017
CODE=1
MAJOR=1
PRE_RELEASE=b1
MINOR=0
BUILD=12
PATCH=0
13 changes: 9 additions & 4 deletions flexible-adapter-ui/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
apply plugin: 'com.android.library'
apply plugin: 'eu.davidea.grabver'

versioning {
major 1
minor 0
preRelease "b1"
}

ext {
// Library Settings
libraryName = "FlexibleAdapter UI extension"
libraryCode = 1
libraryVersion = "1.0.0-b1"
libraryDescription = "UI extension for FlexibleAdapter project"
libraryLabels = ['android', 'flexibleadapter', 'adapter', 'ui']

Expand All @@ -20,8 +25,8 @@ android {
defaultConfig {
minSdkVersion minSdk
targetSdkVersion targetSdk
versionCode libraryCode
versionName libraryVersion + libraryDate
versionCode versioning.code
versionName versioning.name
}
buildTypes {
release {
Expand Down
7 changes: 7 additions & 0 deletions flexible-adapter-ui/version.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#Thu Jul 27 17:51:20 CEST 2017
CODE=0
MAJOR=1
PRE_RELEASE=b1
MINOR=0
BUILD=0
PATCH=0
11 changes: 9 additions & 2 deletions flexible-adapter/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
apply plugin: 'com.android.library'
apply plugin: 'com.vanniktech.android.javadoc'
apply plugin: 'eu.davidea.grabver'

versioning {
major 5
minor 0
preRelease "SNAPSHOT"
}

ext {
// Library Settings
Expand All @@ -18,8 +25,8 @@ android {
defaultConfig {
minSdkVersion minSdk
targetSdkVersion targetSdk
versionCode libraryCode
versionName libraryVersion + libraryDate
versionCode versioning.code
versionName versioning.name
}
buildTypes {
release {
Expand Down
7 changes: 7 additions & 0 deletions flexible-adapter/version.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#Thu Jul 27 17:51:20 CEST 2017
CODE=20
MAJOR=5
PRE_RELEASE=SNAPSHOT
MINOR=0
BUILD=5100
PATCH=0

0 comments on commit 711858d

Please sign in to comment.