forked from ArnisLielturks/Urho3D-Project-Template
-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle.kts
61 lines (58 loc) · 1.73 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
buildscript {
extra["kotlinVersion"] = "1.4.10"
val kotlinVersion: String by extra
repositories {
google()
jcenter()
}
dependencies {
classpath("com.android.tools.build:gradle:4.0.2")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
}
}
val kotlinVersion: String by ext
allprojects {
repositories {
google()
jcenter()
// Remove below two repos if you are only using released AAR from JCenter
mavenLocal()
if (System.getenv("GITHUB_ACTOR") != null && System.getenv("GITHUB_TOKEN") != null) {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/urho3d/Urho3D")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}
buildscript {
ext {
set("kotlinVersion", kotlinVersion)
set("ndkSideBySideVersion", "21.3.6528147")
set("cmakeVersion", "3.17.3+")
set("buildStagingDir", ".cxx")
}
}
}
tasks {
wrapper {
distributionType = Wrapper.DistributionType.ALL
}
"prepareKotlinBuildScriptModel" {
listOf("Debug", "Release").forEach {
dependsOn(":app:unzipJni$it")
}
}
register<Delete>("clean") {
// Clean the build artifacts generated by the Gradle build system only, but keep the buildDir
rootProject.buildDir.listFiles { _, name -> name == "intermediates" || name == "kotlin" }?.let {
delete = it.toSet()
}
}
register<Delete>("cleanAll") {
dependsOn("clean")
}
}