Skip to content

Commit

Permalink
[gradle] add: improved publishing script and configs
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoslacz committed Mar 18, 2017
1 parent 9ed2075 commit 64c8723
Show file tree
Hide file tree
Showing 15 changed files with 383 additions and 309 deletions.
10 changes: 6 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.1.0'
ext.kotlin_version = '1.1.1'
repositories {
jcenter()
mavenCentral()
Expand All @@ -13,7 +13,7 @@ buildscript {
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath 'me.tatarka:gradle-retrolambda:3.3.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
Expand All @@ -32,14 +32,16 @@ task clean(type: Delete) {
}

ext {
groupNameAndArtifactPrefix ='com.mateuszkoslacz.moviper:moviper-'

releaseVersionCode = 4
releaseVersionName = '1.3.1-rx2-alpha'
releaseVersionName = '1.4.0-rx2-prealpha'

minSdkVersion = 16
targetSdkVersion = 25
compileSdkVersion = 25
buildToolsVersion = '25.0.2'
supportVersion = '25.1.1'
supportVersion = '25.3.0'
mosbyVersion = '2.0.1'
rxJavaVersion = '2.0.3'
rxAndroidVersion = '2.0.1'
Expand Down
35 changes: 25 additions & 10 deletions moviper-butterknife-viewstate/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
apply plugin: 'com.android.library'
apply plugin: 'android-apt'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: "com.jfrog.bintray"

// This is the library version used when deploying the artifact
version = rootProject.ext.releaseVersionName

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

defaultConfig {
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode rootProject.ext.releaseVersionCode
versionName rootProject.ext.releaseVersionName

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

Expand All @@ -25,13 +29,24 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
androidTestCompile "com.android.support.test.espresso:espresso-core:$rootProject.ext.espressoVersion", {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.1.0'
testCompile 'junit:junit:4.12'
}
compile "com.android.support:appcompat-v7:$rootProject.ext.supportVersion"
testCompile "junit:junit:$rootProject.ext.junitVersion"
compile 'com.jakewharton:butterknife:' + rootProject.ext.butterKnifeVersion
apt 'com.jakewharton:butterknife-compiler:' + rootProject.ext.butterKnifeVersion

compile project(path: ':moviper-viewstate')
}

def submoduleName = 'butterknife-viewstate'
def projectFullName = "$rootProject.ext.groupNameAndArtifactPrefix$submoduleName"

install.repositories.mavenInstaller.pom.project {
name = projectFullName
description = 'Butterknife-Viewstate view extensions for Moviper'
}
bintray.pkg.name = projectFullName

apply from: '../upload.gradle'
39 changes: 27 additions & 12 deletions moviper-butterknife/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
apply plugin: 'com.android.library'
apply plugin: 'android-apt'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: "com.jfrog.bintray"

// This is the library version used when deploying the artifact
version = rootProject.ext.releaseVersionName

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

defaultConfig {
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode rootProject.ext.releaseVersionCode
versionName rootProject.ext.releaseVersionName

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

Expand All @@ -25,13 +29,24 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
androidTestCompile "com.android.support.test.espresso:espresso-core:$rootProject.ext.espressoVersion", {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.1.0'
testCompile 'junit:junit:4.12'
compile 'com.jakewharton:butterknife:' + rootProject.ext.butterKnifeVersion
apt 'com.jakewharton:butterknife-compiler:' + rootProject.ext.butterKnifeVersion
}
compile "com.android.support:appcompat-v7:$rootProject.ext.supportVersion"
testCompile "junit:junit:$rootProject.ext.junitVersion"
compile "com.jakewharton:butterknife:$rootProject.ext.butterKnifeVersion"
apt "com.jakewharton:butterknife-compiler:$rootProject.ext.butterKnifeVersion"

compile project(path: ':moviper-common')
}

def submoduleName = 'butterknife'
def projectFullName = "$rootProject.ext.groupNameAndArtifactPrefix$submoduleName"

install.repositories.mavenInstaller.pom.project {
name = projectFullName
description = 'Butterknife view extensions for Moviper'
}
bintray.pkg.name = projectFullName

apply from: '../upload.gradle'
28 changes: 22 additions & 6 deletions moviper-callbacks/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: "com.jfrog.bintray"

// This is the library version used when deploying the artifact
version = rootProject.ext.releaseVersionName

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

defaultConfig {
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode rootProject.ext.releaseVersionCode
versionName rootProject.ext.releaseVersionName

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

Expand All @@ -30,3 +35,14 @@ dependencies {

compile project(path: ':moviper-common')
}

def submoduleName = 'callbacks'
def projectFullName = "$rootProject.ext.groupNameAndArtifactPrefix$submoduleName"

install.repositories.mavenInstaller.pom.project {
name = projectFullName
description = 'The callbacks Moviper flavor'
}
bintray.pkg.name = projectFullName

apply from: '../upload.gradle'
28 changes: 22 additions & 6 deletions moviper-common/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: "com.jfrog.bintray"

// This is the library version used when deploying the artifact
version = rootProject.ext.releaseVersionName

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

defaultConfig {
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode rootProject.ext.releaseVersionCode
versionName rootProject.ext.releaseVersionName

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

Expand All @@ -30,3 +35,14 @@ dependencies {
compile 'com.android.support:appcompat-v7:' + rootProject.ext.supportVersion
compile 'com.hannesdorfmann.mosby:mvp:' + rootProject.ext.mosbyVersion
}

def submoduleName = 'common'
def projectFullName = "$rootProject.ext.groupNameAndArtifactPrefix$submoduleName"

install.repositories.mavenInstaller.pom.project {
name = projectFullName
description = 'The common Moviper module'
}
bintray.pkg.name = projectFullName

apply from: '../upload.gradle'
38 changes: 26 additions & 12 deletions moviper-databinding-viewstate/build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: "com.jfrog.bintray"

// This is the library version used when deploying the artifact
version = rootProject.ext.releaseVersionName

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

dataBinding {
enabled = true
}
dataBinding.enabled = true

defaultConfig {
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode rootProject.ext.releaseVersionCode
versionName rootProject.ext.releaseVersionName

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

Expand All @@ -27,11 +30,22 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
androidTestCompile("com.android.support.test.espresso:espresso-core:$rootProject.ext.espressoVersion", {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.1.0'
testCompile 'junit:junit:4.12'
compile "com.android.support:appcompat-v7:$rootProject.ext.supportVersion"
testCompile "junit:junit:$rootProject.ext.junitVersion"
compile project(path: ':moviper-viewstate')
compile "com.android.databinding:library:$databindingVersion"
}

def submoduleName = 'databinding-viewstate'
def projectFullName = "$rootProject.ext.groupNameAndArtifactPrefix$submoduleName"

install.repositories.mavenInstaller.pom.project {
name = projectFullName
description = 'Databinding-viewstate view extensions for Moviper'
}
bintray.pkg.name = projectFullName

apply from: '../upload.gradle'
38 changes: 26 additions & 12 deletions moviper-databinding/build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: "com.jfrog.bintray"

// This is the library version used when deploying the artifact
version = rootProject.ext.releaseVersionName

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

dataBinding {
enabled = true
}
dataBinding.enabled = true

defaultConfig {
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode rootProject.ext.releaseVersionCode
versionName rootProject.ext.releaseVersionName

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

Expand All @@ -27,11 +30,22 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
androidTestCompile("com.android.support.test.espresso:espresso-core:$rootProject.ext.espressoVersion", {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.1.0'
testCompile 'junit:junit:4.12'
compile "com.android.support:appcompat-v7:$rootProject.ext.supportVersion"
testCompile "junit:junit:$rootProject.ext.junitVersion"
compile project(path: ':moviper-common')
compile "com.android.databinding:library:$databindingVersion"
}

def submoduleName = 'databinding'
def projectFullName = "$rootProject.ext.groupNameAndArtifactPrefix$submoduleName"

install.repositories.mavenInstaller.pom.project {
name = projectFullName
description = 'Databinding view extensions for Moviper'
}
bintray.pkg.name = projectFullName

apply from: '../upload.gradle'
Loading

0 comments on commit 64c8723

Please sign in to comment.