-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathbuild.gradle.kts
97 lines (86 loc) · 2.65 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
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
90
91
92
93
94
95
96
97
import korlibs.korge.gradle.korge
import java.util.*
plugins {
alias(libs.plugins.korge)
}
project.afterEvaluate {
// tasks.map {
// println("After evaluate Task: $it")
// }
tasks.findByName("preBuild")?.let {
val taskToFix = "jvmProcessResources"
println("Fixing dependency: $it depends on $taskToFix")
it.dependsOn(taskToFix)
// it.mustRunAfter(taskToFix)
}
}
gradle.taskGraph.whenReady(closureOf<TaskExecutionGraph> {
println("Found ${allTasks.size} tasks in task graph: $this")
allTasks.forEach { task ->
println(task)
task.dependsOn.forEach { dep ->
println(" - $dep")
}
}
})
korge {
id = "org.andstatus.game2048"
name = "2048 Open Fun Game"
icon = file("src/commonMain/resources/res/drawable/app_icon.png")
banner = file("src/commonMain/resources/res/drawable/app_icon.png")
jvmMainClassName = "org.andstatus.game2048.MainKt"
androidMinSdk = 24
androidCompileSdk = 35
androidTargetSdk = 35
versionCode = 44
version = "1.15.1"
// Optionally use Android default debug.keystore file
Result.runCatching {
Properties().apply {
load(rootProject.file("local.properties").reader())
}
}.map { properties ->
properties["androidDebugKeystoreFile"]?.let {
androidReleaseSignStoreFile = it.toString()
androidReleaseSignStorePassword = "android"
androidReleaseSignKeyAlias = "androiddebugkey"
androidReleaseSignKeyPassword = "android"
}
}
androidManifestApplicationChunk(
"""
<provider android:name="org.andstatus.game2048.data.FileProvider"
android:authorities="org.andstatus.game2048.data.FileProvider"
android:exported="true" />
<activity android:name=".MyMainActivity"
android:banner="@drawable/app_banner"
android:icon="@drawable/app_icon"
android:label="2048 Open Fun Game"
android:logo="@drawable/app_icon"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
android:screenOrientation="sensor"
android:exported="true"
>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<!-- comment out auto-generated activity
""".trimIndent()
)
androidManifestChunk(
"""
-->
</application>
""".trimIndent()
)
targetJvm()
targetJs()
targetAndroid()
}
//try {
// tasks.named("lintVitalReportRelease").dependsOn("jvmProcessResources")
//} catch (e: Exception) {
// // Ignored
//}