Skip to content

Commit

Permalink
ANDDEP-219 Первичная конфигурация последовательного деплоя артифактов
Browse files Browse the repository at this point in the history
  • Loading branch information
margarita-v committed Sep 7, 2018
2 parents 40f2c76 + 61f53ae commit 1ecfed0
Show file tree
Hide file tree
Showing 41 changed files with 371 additions and 185 deletions.
4 changes: 3 additions & 1 deletion analytics/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ apply from: '../androidModule.gradle'
dependencies {
implementation "com.android.support:support-annotations:$appcompatVersion"
implementation "com.annimon:stream:$annimonStreamVersion"
}
}

gradle.ext."$name" = []
2 changes: 2 additions & 0 deletions animations/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ dependencies {
compileOnly "com.android.support:design:$appcompatVersion"
compileOnly "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
}

gradle.ext."$name" = []
4 changes: 3 additions & 1 deletion app-migration/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ dependencies {
compileOnly project (':shared-pref')
compileOnly project (':logger')
compileOnly project (':rx-extension')
}
}

gradle.ext."$name" = ['shared-pref', 'logger', 'rx-extension']
2 changes: 1 addition & 1 deletion broadcast-extension/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ dependencies {
implementation "io.reactivex.rxjava2:rxjava:$rxJava2Version"
}

gradle.ext."$name" = ["logger"]
gradle.ext."$name" = ['logger']
6 changes: 5 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply plugin: 'maven'
apply from: 'modules.gradle'

import com.android.build.gradle.LibraryPlugin

def modules = gradle.ext.extractModules('modules.json')*.name

allprojects {
/*
def taskNames = project.gradle.startParameter.taskNames
Expand All @@ -17,8 +20,9 @@ allprojects {
}
}
}*/
if (it != rootProject && it.name != "test-module") {
if (it != rootProject && it.name in modules) {
it.afterEvaluate {
println "$it.name"
if (it.plugins.hasPlugin(LibraryPlugin)) {
it.apply from: "$rootDir/deploy.gradle"
}
Expand Down
2 changes: 2 additions & 0 deletions camera-view/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ dependencies {
exclude module: 'support-annotations'
}
}

gradle.ext."$name" = []
2 changes: 2 additions & 0 deletions connection/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ dependencies {
compileOnly project (':dagger-scope')
api "io.reactivex.rxjava2:rxjava:$rxJava2Version"
}

gradle.ext."$name" = ['dagger-scope']
4 changes: 3 additions & 1 deletion converter-gson/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ dependencies {

implementation "com.android.support:support-annotations:$appcompatVersion"
api "com.google.code.gson:gson:$gsonVersion"
}
}

gradle.ext."$name" = ['network', 'logger']
4 changes: 3 additions & 1 deletion core-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ dependencies {

//logging
implementation "com.github.anrwatchdog:anrwatchdog:$anrWatchDogVersion"
}
}

gradle.ext."$name" = ['logger', 'connection', 'rx-extension', 'util-ktx', 'easyadapter']
4 changes: 3 additions & 1 deletion core-mvp-binding/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ dependencies {
compileOnly project(':core-ui')
compileOnly project(':core-mvp')
compileOnly project(':util-ktx')
}
}

gradle.ext."$name" = ['core-app', 'core-ui', 'core-mvp', 'util-ktx']
4 changes: 3 additions & 1 deletion core-mvp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ dependencies {

androidTestImplementation "com.android.support.test:runner:$testRunnerVersion"
androidTestImplementation "com.android.support.test.espresso:espresso-core:$espressoVersion"
}
}

gradle.ext."$name" = ['logger', 'easyadapter', 'connection', 'rx-extension', 'util-ktx', 'core-ui']
4 changes: 3 additions & 1 deletion core-ui/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ dependencies {
api "com.android.support:design:$appcompatVersion"
implementation "com.annimon:stream:$annimonStreamVersion"
compileOnly "com.android.support:support-annotations:$appcompatVersion"
}
}

gradle.ext."$name" = ['logger', 'rx-extension', 'core-app']
4 changes: 3 additions & 1 deletion custom-view/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ dependencies {

implementation "me.zhanghai.android.materialprogressbar:library:$materialProgressBarVersion"
implementation "com.wang.avi:library:$wangAviLibraryVersion"
}
}

gradle.ext."$name" = ['util-ktx', 'rx-extension', 'animations', 'logger']
4 changes: 3 additions & 1 deletion dagger-scope/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ apply from: '../androidModule.gradle'
dependencies {
api "javax.inject:javax.inject:$javaInjectVersion"
api "com.google.dagger:dagger:$daggerVersion"
}
}

gradle.ext."$name" = []
4 changes: 3 additions & 1 deletion datalist-limit-offset/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ dependencies {
testImplementation "junit:junit:$junitVersion"
androidTestImplementation "com.android.support.test:runner:$testRunnerVersion"
androidTestImplementation "com.android.support.test.espresso:espresso-core:$espressoVersion"
}
}

gradle.ext."$name" = ['rx-extension']
2 changes: 1 addition & 1 deletion datalist-page-count/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ dependencies {
androidTestImplementation "com.android.support.test.espresso:espresso-core:$espressoVersion"
}

gradle.ext."$name" = ["logger", "rx-extension"]
gradle.ext."$name" = ['logger', 'rx-extension']
2 changes: 2 additions & 0 deletions easyadapter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ dependencies {
compileOnly "com.android.support:support-annotations:${appcompatVersion}"
api "com.android.support:recyclerview-v7:${appcompatVersion}"
}

gradle.ext."$name" = []
6 changes: 4 additions & 2 deletions filestorage/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ apply from: '../androidModule.gradle'

dependencies {
compileOnly project(':logger')
compileOnly project (':util-ktx')
compileOnly project(':util-ktx')

compileOnly "com.android.support:support-annotations:${appcompatVersion}"
implementation "org.jetbrains:annotations:$jetbrainsAnnotationsVersion"
implementation "com.android.support:appcompat-v7:$appcompatVersion"

implementation "com.annimon:stream:${annimonStreamVersion}"
}
}

gradle.ext."$name" = ['logger', 'util-ktx']
4 changes: 3 additions & 1 deletion firebase-analytics/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
apply from: '../androidModule.gradle'

dependencies {
compileOnly project(path: ':analytics')
compileOnly project(':analytics')
compileOnly "com.google.firebase:firebase-core:${firebaseCoreVersion}"
}

gradle.ext."$name" = ['analytics']

4 changes: 3 additions & 1 deletion imageloader/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ dependencies {
compileOnly project(':util-ktx')

implementation "com.github.bumptech.glide:glide:$glideVersion"
}
}

gradle.ext."$name" = ['logger', 'util-ktx']
4 changes: 3 additions & 1 deletion location/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ dependencies {
compileOnly project(':rx-extension')

implementation "com.google.android.gms:play-services-location:15.0.1"
}
}

gradle.ext."$name" = ['core-ui', 'rx-extension']
6 changes: 4 additions & 2 deletions message-controller/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
apply from: '../androidModule.gradle'

dependencies {
compileOnly project(path: ':core-ui')
compileOnly project(':core-ui')

implementation "com.android.support:exifinterface:$appcompatVersion"
}
}

gradle.ext."$name" = ['core-ui']
10 changes: 4 additions & 6 deletions modules.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import groovy.json.JsonSlurper

gradle.ext {
modules = Module.modules('modules.json', 'modules')
samples = Module.modules('samples.json', 'samples')
extractModules = { jsonFilePath -> Module.modules(jsonFilePath) }
}

class Module {
Expand All @@ -14,14 +13,13 @@ class Module {
this.path = path
}

static def modules(final String fileName, final String modulesArrayName) {
static def modules(final String fileName) {
try {
def jsonObject = new JsonSlurper().parse(new File(fileName), 'utf-8')
assert jsonObject instanceof Map
assert jsonObject."$modulesArrayName" instanceof List
assert jsonObject instanceof List

def list = []
jsonObject."$modulesArrayName".each {
jsonObject.each {
list.add(new Module(it.name, it.path))
}

Expand Down
Loading

0 comments on commit 1ecfed0

Please sign in to comment.