From 4ce77354cce9e1c8ce655f3f26098cfa86801f6b Mon Sep 17 00:00:00 2001 From: Malik Date: Thu, 5 Sep 2019 22:31:34 +0300 Subject: [PATCH 1/2] Update gradle files --- README.md | 45 +++++++++++++++++++++++++-------------------- modules.gradle | 41 ----------------------------------------- settings.gradle | 3 --- 3 files changed, 25 insertions(+), 64 deletions(-) delete mode 100644 modules.gradle delete mode 100644 settings.gradle diff --git a/README.md b/README.md index 4211b6d..53640c2 100644 --- a/README.md +++ b/README.md @@ -45,31 +45,36 @@ RecyclerView - один из самых часто используемых ин ```gradle dependencies { - implementation project(':utils') - implementation project(':views') - implementation project(':storable') - implementation project(':logging') - implementation project(':api-logansquare') - implementation project(':lifecycle') - implementation project(':lifecycle-rx') - implementation project(':navigation') - implementation project(':recyclerview-adapters') - implementation project(':recyclerview-calendar') - implementation project(':kotlin-extensions') - implementation project(':livedata-location') - implementation project(':tabbar-navigation') - implementation project(':base-map') - implementation project(':yandex-map') - implementation project(':google-map') + gradle.ext.roboswag.forEach { module -> + implementation project(":$module") + } } ``` -Можно подключать только те модули, которые вам необходимы. - +Управление зависимостями нужно производить с помощью `ext.roboswag` добавляя или удаляя из него названия модулей. #### settings.gradle (Module: project) ```gradle -gradle.ext.componentsRoot = "RoboSwag" -apply from: "$gradle.ext.componentsRoot/modules.gradle" +gradle.ext.roboswag = [ + 'utils', + 'logging', + 'navigation', + 'storable', + 'api-logansquare', + 'lifecycle', + 'views', + 'recyclerview-adapters', + 'kotlin-extensions', + 'recyclerview-calendar', + 'tabbar-navigation', + 'base-map', + 'yandex-map', + 'google-map' +] + +gradle.ext.roboswag.forEach { module -> + include ":$module" + project(":$module").projectDir = file("RoboSwag/$module") +} ``` ### R8/Proguard diff --git a/modules.gradle b/modules.gradle deleted file mode 100644 index 28a1838..0000000 --- a/modules.gradle +++ /dev/null @@ -1,41 +0,0 @@ -final String rootDir -//todo remove first if when migrate to Kotlin DSL -if (gradle.ext.has('componentsRoot')) { - rootDir = gradle.ext['componentsRoot'] -} else if (ext.has('componentsRoot')) { - rootDir = ext['componentsRoot'] -} else { - rootDir = settingsDir -} - -include ':logging' -include ':utils' -include ':navigation' -include ':storable' -include ':api-logansquare' -include ':lifecycle' -include ':lifecycle-rx' -include ':views' -include ':recyclerview-adapters' -include ':kotlin-extensions' -include ':recyclerview-calendar' -include ':tabbar-navigation' -include ':base-map' -include ':yandex-map' -include ':google-map' - -project(':utils').projectDir = new File(rootDir, 'utils') -project(':logging').projectDir = new File(rootDir, 'logging') -project(':navigation').projectDir = new File(rootDir, 'navigation') -project(':storable').projectDir = new File(rootDir, 'storable') -project(':api-logansquare').projectDir = new File(rootDir, 'api-logansquare') -project(':lifecycle').projectDir = new File(rootDir, 'lifecycle') -project(':lifecycle-rx').projectDir = new File(rootDir, 'lifecycle-rx') -project(':views').projectDir = new File(rootDir, 'views') -project(':recyclerview-adapters').projectDir = new File(rootDir, 'recyclerview-adapters') -project(':kotlin-extensions').projectDir = new File(rootDir, 'kotlin-extensions') -project(':recyclerview-calendar').projectDir = new File(rootDir, 'recyclerview-calendar') -project(':tabbar-navigation').projectDir = new File(rootDir, 'tabbar-navigation') -project(':base-map').projectDir = new File(rootDir, 'base-map') -project(':yandex-map').projectDir = new File(rootDir, 'yandex-map') -project(':google-map').projectDir = new File(rootDir, 'google-map') diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index c8a70f0..0000000 --- a/settings.gradle +++ /dev/null @@ -1,3 +0,0 @@ -apply from: 'modules.gradle' - -include 'sample' From 2eafe87a41ede9681bd89f4a99ce61e49bda1feb Mon Sep 17 00:00:00 2001 From: Malik Date: Tue, 10 Sep 2019 13:58:03 +0300 Subject: [PATCH 2/2] Fix submodules' READMEs --- kotlin-extensions/README.md | 6 ------ lifecycle-rx/README.md | 6 ------ lifecycle/README.md | 6 ------ livedata-location/README.md | 6 ------ navigation/README.md | 6 ------ recyclerview-adapters/README.md | 5 ----- tabbar-navigation/README.md | 6 ------ 7 files changed, 41 deletions(-) diff --git a/kotlin-extensions/README.md b/kotlin-extensions/README.md index 7e23a7a..c4b7351 100644 --- a/kotlin-extensions/README.md +++ b/kotlin-extensions/README.md @@ -59,9 +59,3 @@ class LinkViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { } } ``` - -### Подключение - -```gradle -implementation project(':kotlin-extensions') -``` diff --git a/lifecycle-rx/README.md b/lifecycle-rx/README.md index e527153..a56b919 100644 --- a/lifecycle-rx/README.md +++ b/lifecycle-rx/README.md @@ -48,9 +48,3 @@ someViewModel.itemsList.observe(this, Observer { event -> } }) ``` - -### Подключение - -``` gradle -implementation project(':lifecycle-rx') -``` diff --git a/lifecycle/README.md b/lifecycle/README.md index 1c265cf..e6a0544 100644 --- a/lifecycle/README.md +++ b/lifecycle/README.md @@ -41,9 +41,3 @@ event.observe(this, Observer { event -> } }) ``` - -### Подключение - -```gradle -implementation project(':lifecycle') -``` diff --git a/livedata-location/README.md b/livedata-location/README.md index 5789566..3a221d4 100644 --- a/livedata-location/README.md +++ b/livedata-location/README.md @@ -25,9 +25,3 @@ val locationWithInterval = LocationLiveData( ```kotlin viewModel.locationWithInterval.observe(this, Observer(::onLocationChanged)) ``` - -### Подключение - -``` gradle -implementation project(':livedata-location') -``` \ No newline at end of file diff --git a/navigation/README.md b/navigation/README.md index 097ac0d..d470eef 100644 --- a/navigation/README.md +++ b/navigation/README.md @@ -121,9 +121,3 @@ class MainViewController( ```gradle implementation project(':logging') ``` - -### Подключение - -```gradle -implementation project(':navigation') -``` diff --git a/recyclerview-adapters/README.md b/recyclerview-adapters/README.md index 3328fe7..b0050e9 100644 --- a/recyclerview-adapters/README.md +++ b/recyclerview-adapters/README.md @@ -64,8 +64,3 @@ class HeaderDelegate( ) = holder.itemView.setOnClickListener { addAction.invoke() } } ``` - -### Подключение -```gralde -implementation project(':recyclerview-adapters') -``` diff --git a/tabbar-navigation/README.md b/tabbar-navigation/README.md index 0555247..e6499d8 100644 --- a/tabbar-navigation/README.md +++ b/tabbar-navigation/README.md @@ -124,9 +124,3 @@ class MainViewController( ```gradle implementation project(':navigation') ``` - -### Подключение - -```gradle -implementation project(':tabbar-navigation') -```