1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- plugins {
- id 'com.android.application'
- id 'kotlin-android'
- }
- def keystorePropertiesFile = rootProject.file("keystore.properties")
- def keystoreProperties = new Properties()
- keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
- android {
- compileSdk rootProject.ext.android.compileSdk
- buildToolsVersion rootProject.ext.android.buildToolsVersion
- defaultConfig {
- applicationId "com.yyxx.lab.demo"
- minSdk rootProject.ext.android.minSdk
- targetSdk rootProject.ext.android.targetSdk
- versionCode rootProject.ext.android.versionCode
- versionName rootProject.ext.android.versionName
- ndk {
- // 设置支持的SO库架构
- abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
- }
- }
- buildFeatures {
- viewBinding true
- compose true
- buildConfig false
- }
- signingConfigs {
- config {
- keyAlias keystoreProperties['keyAlias']
- keyPassword keystoreProperties['keyPassword']
- storeFile file(keystoreProperties['storeFile'])
- storePassword keystoreProperties['storePassword']
- }
- }
- buildTypes {
- debug {
- minifyEnabled false
- signingConfig signingConfigs.config
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- release {
- minifyEnabled false
- signingConfig signingConfigs.config
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- composeOptions {
- kotlinCompilerExtensionVersion compose_version
- kotlinCompilerVersion kotlin_version
- }
- kotlinOptions {
- jvmTarget = '1.8'
- useIR = true
- }
- packagingOptions {
- resources {
- excludes += '/META-INF/{AL2.0,LGPL2.1}'
- }
- }
- }
- dependencies {
- implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
- implementation project(':flutter')
- // ktx
- api rootProject.ext.ktxLibs
- // jetpack
- api rootProject.ext.jetpackLibs
- // ui
- api rootProject.ext.uiLibs
- implementation "androidx.compose.material:material:$compose_version"
- implementation 'androidx.activity:activity-compose:1.4.0'
- implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
- implementation "androidx.compose.ui:ui:$compose_version"
- implementation "androidx.compose.ui:ui-tooling:$compose_version"
- implementation "androidx.compose.runtime:runtime:$compose_version"
- implementation "androidx.compose.runtime:runtime-livedata:$compose_version"
- implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.4.0"
- debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
- debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.7'
- }
|