-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle
More file actions
89 lines (78 loc) · 2.72 KB
/
Copy pathbuild.gradle
File metadata and controls
89 lines (78 loc) · 2.72 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
agp_version = '9.1.1'
glmap_version = '2.0.0'
app_compat_version = '1.7.1'
multidex_version = '2.0.1'
gms_location_version = '21.3.0'
min_sdk_version = 21
sdk_version = 37
version_code = 20000
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:$agp_version"
}
}
plugins {
id 'com.android.application' version "$agp_version" apply false
id 'com.android.library' version "$agp_version" apply false
}
def useLocalGLMap = providers.gradleProperty('useLocalGLMap')
.map { it.toBoolean() }
.orElse(false)
.get()
ext.useLocalGLMap = useLocalGLMap
allprojects {
ext.compileSDK = sdk_version
ext.targetSDK = sdk_version
ext.minSDK = min_sdk_version
ext.buildToolsVersion = '37.0.0'
ext.ndkVersion = '29.0.14206865'
ext.cmakeVersion = '4.1.2'
ext.cmakeArguments = ['-DANDROID_STL=c++_shared']
ext.javaVersion = JavaVersion.VERSION_17
ext.groupID = 'globus'
ext.glmapVersion = glmap_version
ext.mavenUser = findProperty('GLOBUS_MAVEN_USER') ?: System.getenv('GLOBUS_MAVEN_USER') ?: ''
ext.mavenPass = findProperty('GLOBUS_MAVEN_PASS') ?: System.getenv('GLOBUS_MAVEN_PASS') ?: ''
ext.maven = glmap_version.endsWith('-SNAPSHOT')
? 'https://maven.globus.software/artifactory/snapshots'
: 'https://maven.globus.software/artifactory/libs'
}
if (useLocalGLMap) {
subprojects {
configurations.configureEach {
resolutionStrategy.dependencySubstitution {
substitute module('globus:glmap-defaultstyle') using project(':res-defaultstyle')
}
}
}
[project(':glmap'), project(':glroute'), project(':glsearch')].each { localProject ->
localProject.tasks.configureEach {
if (name == 'prefabDebugConfigurePackage' || name == 'prefabReleaseConfigurePackage') {
outputs.upToDateWhen { false }
}
}
}
project(':glroute').tasks.configureEach {
if (name.startsWith('configureCMakeDebug')) {
dependsOn ':glmap:prefabDebugPackage'
}
if (name.startsWith('configureCMakeRelWithDebInfo')) {
dependsOn ':glmap:prefabReleasePackage'
}
}
project(':glsearch').tasks.configureEach {
if (name.startsWith('configureCMakeDebug')) {
dependsOn ':glmap:prefabDebugPackage'
}
if (name.startsWith('configureCMakeRelWithDebInfo')) {
dependsOn ':glmap:prefabReleasePackage'
}
}
}