-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
Copy pathbuild.gradle.kts
41 lines (33 loc) · 1.05 KB
/
build.gradle.kts
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
/*
* Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
val tasksVersion = "16.0.1"
val artifactType = Attribute.of("artifactType", String::class.java)
val unpackedAar = Attribute.of("unpackedAar", Boolean::class.javaObjectType)
configurations.configureEach {
afterEvaluate {
if (isCanBeResolved) {
attributes.attribute(unpackedAar, true) // request all AARs to be unpacked
}
}
}
dependencies {
attributesSchema {
attribute(unpackedAar)
}
artifactTypes {
create("aar") {
attributes.attribute(unpackedAar, false)
}
}
registerTransform(UnpackAar::class.java) {
from.attribute(unpackedAar, false).attribute(artifactType, "aar")
to.attribute(unpackedAar, true).attribute(artifactType, "jar")
}
api("com.google.android.gms:play-services-tasks:$tasksVersion") {
exclude(group="com.android.support")
}
}
externalDocumentationLink(
url = "https://developers.google.com/android/reference/"
)