-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsettings.gradle
58 lines (53 loc) · 1.9 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
maven { url="https://jitpack.io" }
flatDir {
dirs("libs")
}
}
}
def gitlabMavenUrl = getProperties().get("gitlabMavenUrl")
def gitlabDeployToken = getProperties().get("gitlabDeployToken")
println("useProductionPublicRepo: " + useProductionPublicRepo)
println("useLocalProperties: " + useLocalProperties)
println("useLocalDeploy: " + useLocalDeploy)
if (useProductionPublicRepo.toBoolean() == false && useLocalProperties.toBoolean() == true) {
println("get sdk from dev private repo")
Properties localProperties = new Properties()
localProperties.load(new File(rootDir.absolutePath + "/local.properties").newDataInputStream())
gitlabMavenUrl = localProperties['gitlabPrivateMavenUrl']
gitlabDeployToken = localProperties['gitlabPrivateDeployToken']
}
println("gitlabMavenUrl: " + gitlabMavenUrl)
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url="https://jitpack.io" }
if (useLocalDeploy.toBoolean()) {
maven {url = "file://$rootDir/../../android-sdk/sdk/deploy"}
} else {
maven {
name = "android-sdk"
url gitlabMavenUrl
// url "https://gitlab.com/api/v4/projects/$mavenProject/packages/maven"
credentials(HttpHeaderCredentials) {
name = "Deploy-Token"
value = gitlabDeployToken // to get it from the gradle.properties just use gitlabDeployToken
}
authentication {
header(HttpHeaderAuthentication)
}
}
}
flatDir {
dirs("libs")
}
}
}
rootProject.name = "Fireblocks NCW Demo"
include ':app'