diff --git a/app/build.gradle.kts b/app/build.gradle.kts index cb23aca34..ae52d0a08 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -15,15 +15,13 @@ android { namespace = "org.cosmicide" compileSdk = 34 - moveSdkToAssetsIfNeeded() - defaultConfig { val commit = getGitCommit() applicationId = "org.cosmicide" minSdk = 26 targetSdk = 34 - versionCode = 22 - versionName = "2.2" + versionCode = 23 + versionName = "2.2.1" buildConfigField("String", "GIT_COMMIT", "\"$commit\"") } @@ -98,12 +96,17 @@ android { } } +tasks.assemble { + dependsOn("copySdk") +} + // Copies `android.jar` and `core-lambda-stubs.jar` from Android SDK to app's assets. // Note: The version used is the latest one installed on the machine. -fun moveSdkToAssetsIfNeeded() { +tasks.create("copySdk") { val assets = File(System.getProperty("user.dir") + "/app/src/main/assets") val androidJar = assets.resolve("android.jar") + if (androidJar.exists().not()) { println("Copying SDK android.jar to ${androidJar.absolutePath}") getAndroidJar().copyTo(androidJar) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index be4ff5e6e..dbaac95ef 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -8,6 +8,7 @@ Cosmic IDE Rewrite Settings + Import Project App theme @@ -86,7 +87,7 @@ Class name No projects found. Create one now! Cosmic IDE requires certain resources to build and run your projects. Press the button below to initiate the download process and configure them. - This will download and configure the following resources: \n• android.jar (Required for compilation)\n• core-lambdas-stubs.jar (Required for using lambdas in java)\n• index.json (Required for Java code completion) + This will download and configure the following resources: \n• index.json (Required for Java code completion) Install Navigation Item Kind Clear diff --git a/build.gradle.kts b/build.gradle.kts index 44616f108..0d582ac54 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -14,8 +14,8 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id("com.android.application") version "8.1.1" apply false - id("com.android.library") version "8.1.1" apply false + id("com.android.application") version "8.1.2" apply false + id("com.android.library") version "8.1.2" apply false id("org.jetbrains.kotlin.android") version "1.9.10" apply false id("org.jetbrains.kotlin.jvm") version "1.9.10" apply false id("dev.rikka.tools.materialthemebuilder") version "1.3.3" apply false