129 lines
4.1 KiB
Kotlin
129 lines
4.1 KiB
Kotlin
plugins {
|
|
alias(libs.plugins.androidApplication)
|
|
alias(libs.plugins.kotlinAndroid)
|
|
}
|
|
|
|
android {
|
|
namespace = "com.ea.games.nfs13_na"
|
|
compileSdk = 34
|
|
|
|
defaultConfig {
|
|
applicationId = "com.ea.games.nfs13_mod"
|
|
minSdk = 21
|
|
targetSdk = 34
|
|
// Matches the real game's own versionCode/versionName (and the
|
|
// main.1003128.com.ea.games.nfs13_mod.obb file already on the test
|
|
// device) so this build installs as an update rather than tripping
|
|
// Android's downgrade protection. NOTE: the claim that the game's own
|
|
// code looks up an OBB file via "main.<versionCode>.<package>.obb" is
|
|
// UNVERIFIED - grepped the entire launcher source tree (Java/Kotlin/
|
|
// XML) and libapp.so for "obb"/"addAssetPath"/"mountObb"/
|
|
// "StorageManager" and found zero references anywhere. This value
|
|
// just avoids the installer-level downgrade block; it is not known to
|
|
// affect asset/cache loading. See ANALYSIS.md for the still-open
|
|
// question of how this build actually locates game_cache/published/.
|
|
versionCode = 1003128
|
|
versionName = "1.3.128"
|
|
|
|
buildConfigField( "String", "DEV_MENU_VERSION", "\"0.1\"")
|
|
buildConfigField( "String", "DEV_MENU_ID", "\"DevMenu\"")
|
|
|
|
ndk.abiFilters.add("armeabi-v7a")
|
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
vectorDrawables {
|
|
useSupportLibrary = true
|
|
}
|
|
}
|
|
ndkVersion = "21.0.6113669"
|
|
|
|
packaging {
|
|
resources.excludes.add("META-INF/DEPENDENCIES")
|
|
resources.excludes.add("META-INF/LICENSE")
|
|
resources.excludes.add("META-INF/LICENSE.txt")
|
|
resources.excludes.add("META-INF/license.txt")
|
|
resources.excludes.add("META-INF/NOTICE")
|
|
resources.excludes.add("META-INF/NOTICE.txt")
|
|
resources.excludes.add("META-INF/notice.txt")
|
|
resources.excludes.add("META-INF/ASL2.0")
|
|
resources.excludes.add("META-INF/*.kotlin_module")
|
|
}
|
|
|
|
android.buildFeatures.buildConfig = true
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = false
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
}
|
|
}
|
|
|
|
productFlavors {
|
|
|
|
flavorDimensions.add("nfsmw")
|
|
|
|
create("devmenu") {
|
|
dimension = "nfsmw"
|
|
minSdk = 21
|
|
}
|
|
create("no_devmenu") {
|
|
dimension = "nfsmw"
|
|
minSdk = 21
|
|
}
|
|
}
|
|
|
|
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
targetCompatibility = JavaVersion.VERSION_11
|
|
}
|
|
kotlinOptions {
|
|
jvmTarget = "11"
|
|
}
|
|
buildFeatures {
|
|
compose = true
|
|
}
|
|
composeOptions {
|
|
kotlinCompilerExtensionVersion = "1.5.7"
|
|
}
|
|
packaging {
|
|
resources {
|
|
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
|
|
implementation(libs.core.ktx)
|
|
implementation(libs.lifecycle.runtime.ktx)
|
|
implementation(libs.activity.compose)
|
|
implementation(platform(libs.compose.bom))
|
|
implementation(libs.ui)
|
|
implementation(libs.ui.graphics)
|
|
implementation(libs.ui.tooling.preview)
|
|
implementation(libs.material3)
|
|
implementation(project(mapOf("path" to ":mpcore")))
|
|
testImplementation(libs.junit.v412)
|
|
//testImplementation(libs.junit)
|
|
androidTestImplementation(libs.androidx.test.ext.junit)
|
|
androidTestImplementation(libs.espresso.core)
|
|
androidTestImplementation(platform(libs.compose.bom))
|
|
androidTestImplementation(libs.ui.test.junit4)
|
|
debugImplementation(libs.ui.tooling)
|
|
debugImplementation(libs.ui.test.manifest)
|
|
implementation(project(mapOf("path" to ":devmenu")))
|
|
|
|
implementation ("commons-codec:commons-codec:1.15")
|
|
|
|
val fragment_version = "1.6.1"
|
|
implementation("androidx.fragment:fragment:$fragment_version")
|
|
// Kotlin
|
|
implementation("androidx.fragment:fragment-ktx:$fragment_version")
|
|
|
|
implementation("androidx.localbroadcastmanager:localbroadcastmanager:1.0.0")
|
|
} |