-
Notifications
You must be signed in to change notification settings - Fork 24
/
settings.gradle
executable file
·28 lines (25 loc) · 1.12 KB
/
settings.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
buildscript {
repositories {
mavenCentral()
jcenter()
}
}
include ':app'
def cloneRepoIfNotExists(String repoUrl, String libName) {
if(!file("libs/$libName").exists()){
Runtime.getRuntime().exec("git clone --depth 1 $repoUrl libs/$libName")
}
}
def includeLibrary(String repoUrl, String libName) {
cloneRepoIfNotExists(repoUrl, libName)
include ":$libName", ":$libName:library"
project(":$libName").projectDir = new File("./libs/$libName")
project(":$libName:library").projectDir = new File("./libs/$libName/library")
}
if(gradle.startParameter.taskNames.stream().anyMatch(task -> task.toLowerCase().contains("fdroidofficial"))) {
includeLibrary("https://git.frostnerd.com/AndroidUtils/Adapters", "adapters")
includeLibrary("https://git.frostnerd.com/AndroidUtils/lifecyclekt", "lifecycle")
includeLibrary("https://git.frostnerd.com/AndroidUtils/preferenceskt", "preferences")
includeLibrary("https://git.frostnerd.com/AndroidUtils/navigationdraweractivity", "navigationdraweractivity")
includeLibrary("https://git.frostnerd.com/AndroidUtils/generalkt", "general")
}