mirror of
https://github.com/FatttSnake/OxygenToolbox.git
synced 2026-04-06 07:11:26 +08:00
Added launch page switch, LibrariesActivity, setting fragment to about fragment action.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'com.mikepenz.aboutlibraries.plugin'
|
||||
}
|
||||
|
||||
android {
|
||||
@@ -13,38 +14,93 @@ android {
|
||||
versionName "1.0"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
// Required when setting minSdkVersion to 20 or lower
|
||||
multiDexEnabled true
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
Properties buildPro = buildSign()
|
||||
storeFile file(buildPro['storeFile'])
|
||||
storePassword buildPro['storePassword']
|
||||
keyAlias buildPro['keyAlias']
|
||||
keyPassword buildPro['keyPassword']
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
minifyEnabled true
|
||||
shrinkResources true
|
||||
signingConfig signingConfigs.release
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
zipAlignEnabled true
|
||||
}
|
||||
}
|
||||
|
||||
android.applicationVariants.all {
|
||||
variant ->
|
||||
variant.outputs.all {
|
||||
output -> outputFileName = new File(variant.name, "OxygenToolbox" + "_" + defaultConfig.versionName + "-" + defaultConfig.versionCode + "_" + buildType.name + ".apk")
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
// Flag to enable support for the new language APIs
|
||||
coreLibraryDesugaringEnabled true
|
||||
// Sets Java compatibility to Java 8
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
viewBinding true
|
||||
}
|
||||
|
||||
namespace 'com.fatapp.oxygentoolbox'
|
||||
}
|
||||
|
||||
def buildSign() {
|
||||
Properties buildProperties = new Properties()
|
||||
buildProperties.load(new FileInputStream(file("../keystore.properties")))
|
||||
return buildProperties
|
||||
}
|
||||
|
||||
aboutLibraries {
|
||||
registerAndroidTasks = false
|
||||
outputFileName = "dependencies.json"
|
||||
exclusionPatterns = [
|
||||
~'androidx.*',
|
||||
~'org.jetbrains.*',
|
||||
~"com.google.android.*",
|
||||
~"com.google.guava:listenablefuture"
|
||||
]
|
||||
}
|
||||
|
||||
task exportLibrariesToJson(group: 'build', description: 'Generate libraries definitions json file', type: com.mikepenz.aboutlibraries.plugin.AboutLibrariesTask, dependsOn:'collectDependencies') {
|
||||
resultDirectory = project.file('src/main/res/raw/')
|
||||
variant = 'release'
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
def assembleTask = tasks.findByName("assembleDebug")
|
||||
assembleTask.dependsOn(exportLibrariesToJson)
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'androidx.preference:preference:1.2.0'
|
||||
//noinspection GradleDependency
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.6'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.4.2'
|
||||
implementation 'com.google.android.material:material:1.6.1'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
implementation 'androidx.navigation:navigation-fragment-ktx:2.4.2'
|
||||
implementation 'androidx.navigation:navigation-ui-ktx:2.4.2'
|
||||
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1'
|
||||
implementation 'androidx.preference:preference:1.2.0'
|
||||
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.0'
|
||||
implementation 'androidx.navigation:navigation-ui-ktx:2.5.0'
|
||||
implementation 'androidx.core:core-splashscreen:1.0.0-rc01'
|
||||
implementation 'androidx.preference:preference-ktx:1.2.0'
|
||||
implementation 'com.google.android.material:material:1.6.1'
|
||||
|
||||
implementation 'com.google.code.gson:gson:2.9.0'
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user