diff --git a/buildSrc/src/main/kotlin/korlibs/korge/gradle/targets/android/AndroidDirect.kt b/buildSrc/src/main/kotlin/korlibs/korge/gradle/targets/android/AndroidDirect.kt
index 35631c8f73..dc4e4b4f76 100644
--- a/buildSrc/src/main/kotlin/korlibs/korge/gradle/targets/android/AndroidDirect.kt
+++ b/buildSrc/src/main/kotlin/korlibs/korge/gradle/targets/android/AndroidDirect.kt
@@ -12,8 +12,7 @@ import korlibs.korge.gradle.targets.jvm.*
import korlibs.korge.gradle.util.*
import org.gradle.api.*
import org.gradle.api.tasks.*
-import org.gradle.api.tasks.compile.*
-import org.jetbrains.kotlin.gradle.dsl.*
+import org.gradle.configurationcache.extensions.*
import java.io.*
fun Project.configureAndroidDirect(projectType: ProjectType, isKorge: Boolean) {
@@ -208,6 +207,15 @@ fun Project.configureAndroidDirect(projectType: ProjectType, isKorge: Boolean) {
val compileDebugJavaWithJavac = project.tasks.findByName("compileDebugJavaWithJavac") as? org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile?
compileDebugJavaWithJavac?.compilerOptions?.jvmTarget?.set(ANDROID_JVM_TARGET)
+ for (kind in listOf("debug", "release")) {
+ val kindCap = kind.capitalized()
+ tasks.create("packageAndroid$kindCap", Task::class.java) {
+ it.dependsOn("bundle$kindCap")
+ it.group = GROUP_KORGE_PACKAGE
+ it.description = "Creates an AAB $kind file in the `build/outputs/bundle/$kind` folder (replaces APK)"
+ }
+ }
+
//tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile::class.java).configureEach {
// it.compilerOptions.jvmTarget.set(ANDROID_JVM_TARGET)
// //it.jvmTargetValidationMode.set(org.jetbrains.kotlin.gradle.dsl.jvm.JvmTargetValidationMode.WARNING)
diff --git a/buildSrc/src/main/resources/banners/korge.png b/buildSrc/src/main/resources/banners/korge.png
index caaaede5d0..a60c8f7c91 100644
Binary files a/buildSrc/src/main/resources/banners/korge.png and b/buildSrc/src/main/resources/banners/korge.png differ
diff --git a/korge-gradle-plugin/src/main/kotlin/com/soywiz/kproject/AndroidConfig.kt b/korge-gradle-plugin/src/main/kotlin/com/soywiz/kproject/AndroidConfig.kt
index 64e2d12740..04e04d86b2 100644
--- a/korge-gradle-plugin/src/main/kotlin/com/soywiz/kproject/AndroidConfig.kt
+++ b/korge-gradle-plugin/src/main/kotlin/com/soywiz/kproject/AndroidConfig.kt
@@ -3,23 +3,23 @@ package com.soywiz.kproject
import org.gradle.api.*
import java.io.*
-object AndroidConfig {
- fun getAndroidManifestFile(
- project: Project,
- minSdk: Int = korlibs.korge.gradle.targets.android.ANDROID_DEFAULT_MIN_SDK,
- targetSdk: Int = korlibs.korge.gradle.targets.android.ANDROID_DEFAULT_TARGET_SDK,
- compileSdk: Int = korlibs.korge.gradle.targets.android.ANDROID_DEFAULT_COMPILE_SDK,
- ): File {
- return File(project.buildDir, "AndroidManifest.xml").also {
- if (!it.exists()) {
- it.parentFile.mkdirs()
- it.writeText(buildString {
- appendLine("")
- appendLine("")
- appendLine(" ")
- appendLine("")
- })
- }
- }
- }
-}
+//object AndroidConfig {
+// fun getAndroidManifestFile(
+// project: Project,
+// minSdk: Int = korlibs.korge.gradle.targets.android.ANDROID_DEFAULT_MIN_SDK,
+// targetSdk: Int = korlibs.korge.gradle.targets.android.ANDROID_DEFAULT_TARGET_SDK,
+// compileSdk: Int = korlibs.korge.gradle.targets.android.ANDROID_DEFAULT_COMPILE_SDK,
+// ): File {
+// return File(project.buildDir, "AndroidManifest.xml").also {
+// if (!it.exists()) {
+// it.parentFile.mkdirs()
+// it.writeText(buildString {
+// appendLine("")
+// appendLine("")
+// //appendLine(" ")
+// appendLine("")
+// })
+// }
+// }
+// }
+//}
diff --git a/korge-gradle-plugin/src/main/kotlin/com/soywiz/kproject/KProjectPlugin.kt b/korge-gradle-plugin/src/main/kotlin/com/soywiz/kproject/KProjectPlugin.kt
index 89e390043a..ed073ddc5b 100644
--- a/korge-gradle-plugin/src/main/kotlin/com/soywiz/kproject/KProjectPlugin.kt
+++ b/korge-gradle-plugin/src/main/kotlin/com/soywiz/kproject/KProjectPlugin.kt
@@ -68,7 +68,6 @@ class KProjectPlugin : Plugin {
compilations.all {
it.kotlinOptions.jvmTarget = androidJvmVersion
}
-
}
project.afterEvaluate {
val compileDebugJavaWithJavac = project.tasks.findByName("compileDebugJavaWithJavac") as? org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile?
@@ -78,16 +77,20 @@ class KProjectPlugin : Plugin {
val compileSdk = ANDROID_DEFAULT_COMPILE_SDK
val targetSdk = ANDROID_DEFAULT_TARGET_SDK
val minSdk = ANDROID_DEFAULT_MIN_SDK
- this.compileSdk = ANDROID_DEFAULT_COMPILE_SDK
+ this.compileSdk = compileSdk
+ this.defaultConfig {
+ this.minSdk = minSdk
+ this.targetSdk = targetSdk
+ }
namespace = ("${project.group}.${project.name}").replace("-", ".")
sourceSets.apply {
maybeCreate("main").apply {
- manifest.srcFile(AndroidConfig.getAndroidManifestFile(
- project,
- minSdk = minSdk,
- targetSdk = targetSdk,
- compileSdk = compileSdk,
- ))
+ //manifest.srcFile(AndroidConfig.getAndroidManifestFile(
+ // project,
+ // minSdk = minSdk,
+ // targetSdk = targetSdk,
+ // compileSdk = compileSdk,
+ //))
}
}
}