plugins { id 'com.android.application' id 'org.jetbrains.kotlin.android' } def sdkGroupId = rootProject.findProperty("sellySdkGroupId") ?: "com.sellycloud" def sdkArtifactId = rootProject.findProperty("sellySdkArtifactId") ?: "sellycloudsdk" def sdkVersion = rootProject.findProperty("sellySdkVersion") ?: "1.0.0" def hasLocalSdk = rootProject.file("SellyCloudSDK").exists() def releaseStorePath = project.rootProject.file(findProperty("MY_STORE_FILE") ?: "release.keystore") def hasReleaseKeystore = releaseStorePath != null && releaseStorePath.exists() android { namespace 'com.demo.SellyCloudSDK' compileSdk 34 defaultConfig { ndk { abiFilters "armeabi-v7a", "arm64-v8a" // 同时打包 32/64 位 } resConfigs "zh", "en" // 仅保留中文和英文资源 applicationId "com.demo.SellyCloudSDK" minSdk 26 targetSdk 34 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } signingConfigs { release { if (hasReleaseKeystore) { storeFile releaseStorePath storePassword findProperty("MY_STORE_PASSWORD") ?: "" keyAlias findProperty("MY_KEY_ALIAS") ?: "" keyPassword findProperty("MY_KEY_PASSWORD") ?: "" v1SigningEnabled true v2SigningEnabled true } } } buildTypes { release { shrinkResources false minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' if (hasReleaseKeystore) { signingConfig signingConfigs.release } else { // Allow local CI/dev builds without a private keystore. signingConfig signingConfigs.debug } } } compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 } kotlinOptions { jvmTarget = '17' } buildFeatures { viewBinding true } } dependencies { if (hasLocalSdk) { implementation project(':SellyCloudSDK') } else { implementation files( "libs/${sdkArtifactId}-${sdkVersion}.aar", "libs/ijkplayer-cmake-release.aar", "libs/Kiwi.aar", "libs/libwebrtc.aar" ) implementation 'com.google.code.gson:gson:2.10.1' implementation 'com.github.pedroSG94.RootEncoder:library:2.6.6' } implementation fileTree( dir: "libs", include: ["*.jar", "*.aar"], exclude: [ "${sdkArtifactId}-${sdkVersion}.aar", "ijkplayer-cmake-release.aar", "Kiwi.aar", "libwebrtc.aar" ] ) implementation 'androidx.appcompat:appcompat:1.7.0-alpha03' implementation 'androidx.constraintlayout:constraintlayout:2.2.0-alpha13' implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3' implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3' implementation 'androidx.core:core-ktx:1.13.1' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' implementation 'androidx.activity:activity-ktx:1.9.2' implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.4' implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.8.4' implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.recyclerview:recyclerview:1.3.2' implementation "com.squareup.okhttp3:okhttp:4.12.0" implementation "io.coil-kt:coil:2.6.0" testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test:core:1.5.0' androidTestImplementation 'androidx.test.ext:junit:1.1.5' androidTestImplementation 'androidx.test:runner:1.5.2' }