Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assets实现flavor分化及其它一些优化 #178

Merged
merged 1 commit into from
Nov 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,21 @@ android {

}

sourceSets {
// @Hint by LZX284 on Nov 15, 2023.
// ! The assets file is divided into three directories according to different flavors.
// ! But the files are not actually moved to avoid conflicts with the latest modifications.
getByName("main"){
assets.srcDirs("src/main/assets")
}
getByName(flavorNameApp){
assets.srcDirs("src/main/assets_$flavorNameApp")
}
getByName(flavorNameInrt){
assets.srcDirs("src/main/assets_$flavorNameInrt")
}
}

compileOptions {
isCoreLibraryDesugaringEnabled = true
sourceCompatibility = versions.javaVersion
Expand Down