-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unify dependencies versions by applying buildSrc (#14)
* Making unify dependencies versions feature by applying buildSrc mechanism and Gradle DSL then change all the build.gradle.kts files of all the modules we have to be use the new kotlin class that I made. Since four classes are made : 1. Dependencies : that contains all the dependencies we will use. 2. MainApp : that contains the common things of the whole app. 3. MainClass : that contains the main classes of each module. 4. Projects : that contains the name of projects/modules we have tell now. 5. Versions : that contains the versions that we will use in Dependencies class. * Modify Naming of buildSrc files - Projects file renamed to Modules to be more meaningful. - MainApp file renamed to Project to be more specific.
- Loading branch information
1 parent
feec152
commit c770649
Showing
19 changed files
with
222 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
plugins { | ||
kotlin("jvm") version "1.2.71" | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
compile(kotlin("stdlib-jdk8")) | ||
} | ||
|
21 changes: 21 additions & 0 deletions
21
buildSrc/src/main/java/io/github/tarek360/dependencies/Dependencies.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package io.github.tarek360.dependencies | ||
|
||
object Dependencies { | ||
|
||
var kotlinJDK = "stdlib-jdk8" | ||
|
||
var json = "org.json:json:${Versions.json}" | ||
|
||
val junit = "junit:junit:${Versions.junit}" | ||
|
||
val mockitoCore = "org.mockito:mockito-core:${Versions.mockitoCore}" | ||
|
||
val mockitoKotlin = "com.nhaarman.mockitokotlin2:mockito-kotlin:${Versions.mockitoKotlin}" | ||
|
||
val okHttp3Mock = "com.squareup.okhttp3:mockwebserver:${Versions.okHttp3}" | ||
|
||
val okHttp3 = arrayOf( | ||
"com.squareup.okhttp3:logging-interceptor:${Versions.okHttp3}", | ||
"com.squareup.okhttp3:okhttp:${Versions.okHttp3}") | ||
|
||
} |
7 changes: 7 additions & 0 deletions
7
buildSrc/src/main/java/io/github/tarek360/dependencies/MainClasses.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.github.tarek360.dependencies | ||
|
||
object MainClasses { | ||
|
||
val appKit = "io.github.tarek360.app.AppKt" | ||
|
||
} |
25 changes: 25 additions & 0 deletions
25
buildSrc/src/main/java/io/github/tarek360/dependencies/Modules.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package io.github.tarek360.dependencies | ||
|
||
object Modules { | ||
|
||
val ciDetector = ":ci-detector" | ||
|
||
val core = ":core" | ||
|
||
val gitDiffParser = ":gitdiff-parser" | ||
|
||
val gitDiffProvider = ":gitdiff-provider" | ||
|
||
val gitHost = ":githost" | ||
|
||
val koshry = ":koshry" | ||
|
||
val rules = ":rules" | ||
|
||
val rulesCore = ":rules-core" | ||
|
||
val rulesTest = ":rules-test" | ||
|
||
val testCoverageRule = ":test-coverage-rule" | ||
|
||
} |
9 changes: 9 additions & 0 deletions
9
buildSrc/src/main/java/io/github/tarek360/dependencies/Project.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package io.github.tarek360.dependencies | ||
|
||
object Project { | ||
|
||
val group = "io.github.tarek360" | ||
|
||
val version = "0.0.1" | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
buildSrc/src/main/java/io/github/tarek360/dependencies/Versions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package io.github.tarek360.dependencies | ||
|
||
object Versions { | ||
|
||
val kotlin = "1.2.71" | ||
|
||
val jvmTarget = "1.8" | ||
|
||
val json = "20160810" | ||
|
||
val okHttp3 = "3.11.0" | ||
|
||
val junit = "4.12" | ||
|
||
val mockitoCore = "2.22.0" | ||
|
||
val mockitoKotlin = "2.0.0-RC1" | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
#Thu Aug 16 23:27:56 ICT 2018 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-all.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.