Skip to content

Commit

Permalink
Fix StrictMode Maven artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiryl Rozau committed Mar 9, 2019
1 parent bfbd4da commit c71f6d2
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 16 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies {
implementation "com.kirich1409:strict-mode-compat:28.0.0"
// Kotlin Extensions
implementation "com.kirich1409:strict-mode-compat-kotlin:28.1.1"
implementation "com.kirich1409:strict-mode-compat-kotlin:28.1.2"
}
```

Expand All @@ -30,14 +30,14 @@ Sample
###### build.gradle ######
```groovy
android {
defaultConfig {
buildConfigField 'boolean', 'DEVELOPER_MODE', 'false'
}
buildTypes {
debug {
buildConfigField 'boolean', 'DEVELOPER_MODE', 'true'
}
release {
buildConfigField 'boolean', 'DEVELOPER_MODE', 'false'
}
}
}
```
Expand Down
9 changes: 7 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ buildscript {
}
}

def getVersionCode(String versionName) {
return versionName.split("\\.").collect { String.format("%02d", it.toInteger()) }.join().toInteger()
}

ext {
androidXAnnotationsVersion = '1.0.2'
androidXAppCompatVersion = '1.0.2'
Expand All @@ -25,8 +29,9 @@ ext {
targetSdkVersion = 27
buildToolsVersion = '28.0.3'

versionName = '28.1.1'
versionCode = versionName.split("\\.").collect { String.format("%02d", it.toInteger()) }.join().toInteger()
strictModeCompatVersionName = '28.1.0'
versionName = strictModeCompatVersionName
strictModeCompatKotlinVersionName = '28.1.2'
}

group = 'by.kirich1409'
Expand Down
2 changes: 1 addition & 1 deletion sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ android {
applicationId "com.kirillr.application"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode rootProject.ext.versionCode
versionCode getVersionCode(rootProject.ext.versionName)
versionName rootProject.ext.versionName

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand Down
4 changes: 2 additions & 2 deletions strict-mode-compat-kotlin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName
versionCode getVersionCode(rootProject.ext.strictModeCompatKotlinVersionName)
versionName rootProject.ext.strictModeCompatKotlinVersionName
}
}

Expand Down
4 changes: 2 additions & 2 deletions strict-mode-compat-kotlin/publish.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group = 'com.kirich1409'
version = rootProject.ext.versionName
version = rootProject.ext.strictModeCompatKotlinVersionName

apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
Expand Down Expand Up @@ -38,7 +38,7 @@ bintray {
githubReleaseNotesFile = 'README.md' //Optional Github readme file

version {
name = rootProject.ext.versionName
name = rootProject.ext.strictModeCompatKotlinVersionName
desc = 'Android StrictMode Compat on Kotlin'
released = new Date()
}
Expand Down
4 changes: 2 additions & 2 deletions strict-mode-compat/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName
versionCode getVersionCode(rootProject.ext.strictModeCompatVersionName)
versionName rootProject.ext.strictModeCompatVersionName
}

buildTypes {
Expand Down
4 changes: 2 additions & 2 deletions strict-mode-compat/publish.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group = 'com.kirich1409'
version = rootProject.ext.versionName
version = rootProject.ext.strictModeCompatVersionName

apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
Expand Down Expand Up @@ -50,7 +50,7 @@ bintray {
githubReleaseNotesFile = 'README.md' //Optional Github readme file

version {
name = rootProject.ext.versionName
name = rootProject.ext.strictModeCompatVersionName
desc = 'Android StrictMode Compat Library'
released = new Date()
}
Expand Down

0 comments on commit c71f6d2

Please sign in to comment.