Update setup

This commit is contained in:
topjohnwu 2022-05-27 00:44:20 -07:00
parent 683cfee88b
commit b3f05fd925
4 changed files with 10 additions and 28 deletions

View File

@ -56,10 +56,6 @@ android {
keepDebugSymbols += "**/*.so"
}
}
kotlinOptions {
jvmTarget = "11"
}
}
setupApp()

View File

@ -6,9 +6,6 @@ setupCommon()
android {
namespace = "com.topjohnwu.shared"
defaultConfig {
consumerProguardFiles("proguard-rules.pro")
}
}
dependencies {

View File

@ -1,21 +0,0 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@ -1,3 +1,4 @@
import com.android.build.gradle.BaseExtension
import com.android.build.gradle.internal.dsl.BaseAppModuleExtension
import org.apache.tools.ant.filters.FixCrLfFilter
@ -9,6 +10,7 @@ import org.gradle.api.tasks.StopExecutionException
import org.gradle.api.tasks.Sync
import org.gradle.kotlin.dsl.filter
import org.gradle.kotlin.dsl.named
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptions
import java.io.*
import java.util.*
import java.util.zip.Deflater
@ -22,6 +24,11 @@ private fun Project.androidBase(configure: Action<BaseExtension>) =
private fun Project.android(configure: Action<BaseAppModuleExtension>) =
extensions.configure("android", configure)
private fun Project.kotlinOptions(configure: Action<KotlinJvmOptions>) =
extensions.findByName("kotlinOptions")?.let {
configure.execute(it as KotlinJvmOptions)
}
private val Project.android: BaseAppModuleExtension
get() = extensions.getByName("android") as BaseAppModuleExtension
@ -41,6 +48,9 @@ fun Project.setupCommon() {
targetCompatibility = JavaVersion.VERSION_11
}
}
kotlinOptions {
jvmTarget = "11"
}
}
private fun Project.setupAppCommon() {