You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

114 lines
3.9 KiB

plugins {
id 'com.android.application'
}
def static releaseTime() {
return new Date().format("yyyyMMdd_HHmmss", TimeZone.default)
}
android {
namespace 'cc.niushuai.dididone'
compileSdk 34
defaultConfig {
applicationId "cc.niushuai.dididone"
minSdk 24
targetSdk 32
versionCode 12
versionName "1.2"
resValue "string", "weathericons_version", "${versionName}"
javaCompileOptions {
annotationProcessorOptions {
arguments += [
"room.schemaLocation":"$projectDir/schemas".toString(),
"room.incremental":"true"
]
}
}
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
buildFeatures {
viewBinding true
}
android.applicationVariants.all {
variant ->
variant.outputs.all {
//这里修改apk文件名
outputFileName = "${getAppName()}_v${variant.versionName.replaceAll('\\s+', '_')}_${releaseTime()}_${variant.buildType.name}.apk"
}
}
}
def getAppName() {
def stringsFile = android.sourceSets.main.res.sourceFiles.find { it.name.equals 'strings.xml' }
return new XmlParser().parse(stringsFile).string.find { it.@name.equals 'app_name' }.text()
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.11.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.7.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0'
implementation 'androidx.navigation:navigation-fragment:2.7.7'
implementation 'androidx.navigation:navigation-ui:2.7.7'
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation 'androidx.preference:preference:1.2.1'
// user custom
// icon 组件
implementation "com.mikepenz:iconics-core:3.2.5"
implementation "com.mikepenz:iconics-views:3.2.5"
implementation 'com.mikepenz:google-material-typeface:3.0.1.3.original@aar'
implementation 'com.mikepenz:fontawesome-typeface:5.3.1.1@aar'
implementation 'com.mikepenz:community-material-typeface:3.5.95.1@aar'
implementation 'com.mikepenz:devicon-typeface:2.0.0.5@aar'
implementation 'com.mikepenz:foundation-icons-typeface:3.0.0.5@aar'
implementation 'com.mikepenz:ionicons-typeface:2.0.1.5@aar'
// calendar 组件
// implementation 'com.github.angcyo:CalendarView:3.7.1.37'
implementation 'com.necer.ncalendar:ncalendar:5.0.2'
// 时间选择器组件
implementation 'com.github.loper7:DateTimePicker:0.6.3'
// 颜色选择器
implementation "com.github.skydoves:colorpickerview:2.3.0"
// fab 组件
implementation 'com.github.clans:fab:1.6.4'
// 弹窗组件
implementation 'com.github.li-xiaojun:XPopup:2.9.19'
implementation 'com.github.li-xiaojun:EasyAdapter:1.2.9'
// table layout 组件
implementation 'io.github.h07000223:flycoTabLayout:3.0.0'
// 图表 组件
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
// hutool 工具
implementation 'cn.hutool:hutool-core:5.0.7'
// room持久化库
def room_version = '2.6.1'
implementation "androidx.room:room-runtime:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version"
implementation "androidx.room:room-rxjava2:$room_version"
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
// room分页组件
implementation "androidx.room:room-paging:$room_version"
}