-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
55 lines (48 loc) · 1.33 KB
/
build.gradle
File metadata and controls
55 lines (48 loc) · 1.33 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
def setExtProps(List<String> props) {
props.each { prop ->
if (!project.hasProperty(prop)) {
throw new GradleException("Required property '${prop}' in gradle.properties or local.properties")
}
ext.set(prop, project.property(prop))
}
}
// Chamada da função
setExtProps([
'APP_PACKAGE',
'APP_VERSION',
'APP_VERSION_CODE',
'APP_MIN_SDK_VERSION',
'APP_TARGET_SDK_VERSION',
'ANDROID_COMPILE_SDK_VERSION',
'ANDROID_BUILD_TOOLS_VERSION',
'ANDROID_GRADLE_PLUGIN_VERSION',
])
buildscript {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath "com.quittle.setup-android-sdk:com.quittle.setup-android-sdk.gradle.plugin:3.1.0"
classpath "com.android.tools.build:gradle:$ANDROID_GRADLE_PLUGIN_VERSION"
}
}
apply plugin: 'com.quittle.setup-android-sdk'
setupAndroidSdk {
packages "platforms;android-${ANDROID_COMPILE_SDK_VERSION}",
"build-tools;${ANDROID_BUILD_TOOLS_VERSION}",
"platform-tools",
"cmdline-tools;latest"
def licensesDir = System.getenv("LICENSES_DIR")
if (licensesDir) {
licensesDirectory file(licensesDir)
}
}
allprojects {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}