-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/caches | ||
/.idea/libraries | ||
/.idea/modules.xml | ||
/.idea/workspace.xml | ||
/.idea/navEditor.xml | ||
/.idea/assetWizardSettings.xml | ||
.DS_Store | ||
/build | ||
/captures | ||
.externalNativeBuild | ||
.cxx | ||
local.properties | ||
|
||
# Project exclude paths | ||
/buildSrc/build/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
import kotlin.collections.* | ||
plugins { | ||
id("com.android.application") | ||
id("kotlin-android") | ||
id("kotlin-kapt") | ||
id("kotlin-parcelize") | ||
id("dagger.hilt.android.plugin") | ||
id("org.jetbrains.kotlin.android") | ||
|
||
} | ||
android { | ||
namespace = BuildConfig.applicationId | ||
compileSdk = BuildConfig.compileSdk | ||
|
||
|
||
defaultConfig{ | ||
applicationId = BuildConfig.applicationId | ||
minSdk=BuildConfig.minSdkVersion | ||
targetSdk = BuildConfig.targetSdkVersion | ||
versionCode = BuildConfig.versionCode | ||
versionName = BuildConfig.versionName | ||
testInstrumentationRunner = BuildConfig.testInstrumentationRunner | ||
|
||
ndk { | ||
//不配置则默认构建并打包所有可用的ABI | ||
//same with gradle-> abiFilters 'x86_64','armeabi-v7a','arm64-v8a' | ||
abiFilters.addAll(arrayListOf("x86_64", "armeabi-v7a", "arm64-v8a")) | ||
} | ||
// 开启 Dex 分包 | ||
multiDexEnabled = true | ||
} | ||
|
||
signingConfigs { | ||
// 签名配置 | ||
// getByName("debug") { | ||
// keyAlias = SigningConfigs.key_alias | ||
// keyPassword = SigningConfigs.key_password | ||
// storeFile = file(SigningConfigs.store_file) | ||
// storePassword = SigningConfigs.store_password | ||
// enableV1Signing = true | ||
// enableV2Signing = true | ||
// enableV3Signing = true | ||
// enableV4Signing = true | ||
// | ||
// } | ||
create("release") { | ||
keyAlias = SigningConfigs.key_alias | ||
keyPassword = SigningConfigs.key_password | ||
storeFile = file(SigningConfigs.store_file) | ||
storePassword = SigningConfigs.store_password | ||
enableV1Signing = true | ||
enableV2Signing = true | ||
enableV3Signing = true | ||
enableV4Signing = true | ||
} | ||
} | ||
|
||
buildTypes { | ||
debug { | ||
isMinifyEnabled = false | ||
isZipAlignEnabled = false | ||
isShrinkResources = false | ||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro" | ||
) | ||
signingConfig = signingConfigs.findByName("debug") | ||
} | ||
|
||
release { | ||
isMinifyEnabled = true | ||
isZipAlignEnabled = true | ||
isShrinkResources = true | ||
isDebuggable = false //是否debug | ||
isJniDebuggable = false // 是否打开jniDebuggable开关 | ||
isZipAlignEnabled = true //压缩优化 | ||
|
||
proguardFiles ( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro" | ||
) | ||
signingConfig = signingConfigs.findByName("release") | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_11 | ||
targetCompatibility = JavaVersion.VERSION_11 | ||
} | ||
kotlinOptions { | ||
jvmTarget = "11" | ||
} | ||
buildFeatures { | ||
compose = true | ||
} | ||
composeOptions { | ||
kotlinCompilerExtensionVersion = "1.4.3" | ||
} | ||
packagingOptions { | ||
resources { | ||
excludes += "/META-INF/{AL2.0,LGPL2.1}" | ||
} | ||
} | ||
buildToolsVersion = "33.0.0" | ||
} | ||
|
||
dependencies { | ||
|
||
implementation (AndroidX.coreKtx) | ||
|
||
implementation (AndroidX.Lifecycle.runtimeKtx) | ||
implementation (AndroidX.Compose.activity) | ||
implementation (AndroidX.Compose.ui) | ||
implementation (AndroidX.Compose.tooling_preview) | ||
implementation (AndroidX.Compose.material3) | ||
implementation (AndroidX.Compose.runtime) | ||
implementation (AndroidX.Compose.ui_util) | ||
implementation (AndroidX.Compose.accompanist.insets) | ||
implementation (AndroidX.Compose.accompanist.placeholder) | ||
implementation (AndroidX.Compose.accompanist.systemuicontroller) | ||
implementation (AndroidX.Paging.compose) | ||
implementation (AndroidX.Paging.runtimeKtx) | ||
implementation (AndroidX.Navigation.compose) | ||
implementation (AndroidX.Navigation.uiKtx) | ||
implementation (AndroidX.Navigation.animation) | ||
implementation (AndroidX.Work.runtime) | ||
implementation (AndroidX.Work.runtime_ktx) | ||
implementation (AndroidX.multidex) | ||
//Hilt | ||
implementation (AndroidX.Hilt.common) | ||
kapt (AndroidX.Hilt.compiler) | ||
implementation (AndroidX.Hilt.navigation_compose) | ||
|
||
//Room | ||
implementation(AndroidX.Room.runtime) | ||
kapt(AndroidX.Room.compiler) | ||
implementation(AndroidX.Room.ktx) | ||
|
||
// debugImplementation(ThirdPart.leakcanary) | ||
|
||
implementation(project(Lib.base)) | ||
implementation(project(Lib.common)) | ||
|
||
debugImplementation (AndroidX.Compose.uiTooling) | ||
debugImplementation (AndroidX.Compose.ui_test_manifest) | ||
|
||
testImplementation (Testing.junit) | ||
androidTestImplementation (Testing.androidJunit) | ||
androidTestImplementation (Testing.espresso) | ||
androidTestImplementation (Testing.compose_ui_test) | ||
} |