2023-02-26 05:21:16 +00:00
|
|
|
|
import java.text.DateFormat
|
|
|
|
|
import java.text.SimpleDateFormat
|
|
|
|
|
|
|
|
|
|
plugins {
|
|
|
|
|
id 'com.android.application'
|
|
|
|
|
}
|
|
|
|
|
|
2023-05-02 02:48:51 +00:00
|
|
|
|
def currentTime = getCurrentTime();
|
2023-02-26 05:21:16 +00:00
|
|
|
|
|
|
|
|
|
static def getCurrentTime() {
|
|
|
|
|
DateFormat df = new SimpleDateFormat("yyyy-MM-dd")
|
|
|
|
|
return df.format(Calendar.getInstance(Locale.CHINA).getTime())
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
android {
|
|
|
|
|
|
2023-03-24 16:43:34 +00:00
|
|
|
|
compileSdk 33
|
2023-02-26 05:21:16 +00:00
|
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
|
applicationId "com.bg7yoz.ft8cn"
|
|
|
|
|
minSdk 23
|
2023-03-24 16:43:34 +00:00
|
|
|
|
targetSdk 33
|
2023-02-26 05:21:16 +00:00
|
|
|
|
versionCode 1
|
2023-05-02 02:48:51 +00:00
|
|
|
|
versionName '0.87'
|
2023-02-26 05:21:16 +00:00
|
|
|
|
|
|
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
|
|
|
dataBinding{
|
|
|
|
|
enabled true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
externalNativeBuild {
|
|
|
|
|
cmake {
|
|
|
|
|
cppFlags '-JENABLE_XOM=false'//关闭XOM,
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
ndk{
|
|
|
|
|
abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
|
|
|
|
|
}
|
|
|
|
|
sourceSets{
|
|
|
|
|
main{
|
|
|
|
|
jniLibs.srcDirs=['libs']
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
signingConfig signingConfigs.debug
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
|
|
|
|
|
|
debug{
|
|
|
|
|
buildConfigField("String", "apkBuildTime", "\"${currentTime}\"")
|
|
|
|
|
}
|
|
|
|
|
release {
|
|
|
|
|
minifyEnabled false
|
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
|
|
|
buildConfigField("String", "apkBuildTime", "\"${currentTime}\"")
|
|
|
|
|
|
|
|
|
|
// true - 打开混淆
|
|
|
|
|
//minifyEnabled true
|
|
|
|
|
// true - 打开资源压缩
|
|
|
|
|
//shrinkResources true
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
compileOptions {
|
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
|
|
|
}
|
|
|
|
|
// externalNativeBuild {
|
|
|
|
|
// cmake {
|
|
|
|
|
// path file('src/main/cpp/CMakeLists.txt')
|
|
|
|
|
// version '3.18.1'
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
namespace 'com.bg7yoz.ft8cn'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
|
|
|
|
|
|
implementation 'androidx.appcompat:appcompat:1.4.1'
|
|
|
|
|
implementation 'com.google.android.material:material:1.5.0'
|
|
|
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
|
|
|
|
|
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.1'
|
|
|
|
|
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1'
|
|
|
|
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
|
|
|
|
implementation 'androidx.navigation:navigation-fragment:2.4.1'
|
|
|
|
|
implementation 'androidx.navigation:navigation-ui:2.4.1'
|
|
|
|
|
implementation 'com.google.android.gms:play-services-maps:18.0.2'
|
|
|
|
|
|
|
|
|
|
// implementation 'com.google.code.gson:gson:2.7'
|
2023-03-24 16:43:34 +00:00
|
|
|
|
implementation 'commons-net:commons-net:3.6'//用于时间同步
|
|
|
|
|
implementation 'com.google.guava:guava:31.1-jre'//用于HashTable(多key的HashMap)
|
2023-02-26 05:21:16 +00:00
|
|
|
|
|
2023-03-24 16:43:34 +00:00
|
|
|
|
//testImplementation 'junit:junit:4.13.2'
|
|
|
|
|
//androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
|
|
|
|
//androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
2023-02-26 05:21:16 +00:00
|
|
|
|
|
|
|
|
|
implementation files('src/libs/MPAndroidChartv_3.1.0.jar')
|
|
|
|
|
implementation files('src/libs/nanohttpd-2.2.0.jar')
|
|
|
|
|
implementation files('src/libs/osmdroid-android-6.1.14.aar')//地图控件
|
|
|
|
|
}
|