build.gradle
4.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
apply plugin: 'com.android.application'
android {
def version = "1.0.0"
def getVersionName = { ->
return "20240701"
}
def vcode = 1
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.sw.laryngoscope"
minSdkVersion 24
targetSdkVersion 30
versionCode vcode
versionName "V" + version + "_" + getVersionName()
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
buildConfigField "long", "BUILD_TIMESTAMP", System.currentTimeMillis() + "L"
ndk {
abiFilters 'armeabi-v7a', "arm64-v8a"
}
}
buildFeatures {
viewBinding true
}
signingConfigs {
debug {
keyAlias 'androiddebugkey'
keyPassword 'android'
storeFile file('./AOSP.keystore')
storePassword 'android'
}
relase {
keyAlias 'androiddebugkey'
keyPassword 'android'
storeFile file('./AOSP.keystore')
storePassword 'android'
}
}
buildTypes {
release {
// 混淆
minifyEnabled false
/*// Zipalign优化
zipAlignEnabled true
// 移除无用的resource文件
shrinkResources true*/
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.relase
}
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.debug
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
//自动生成指定名称的release发布版的 apk文件
android.applicationVariants.all { variant ->
def appName
if (project.hasProperty("applicationName")) {
appName = applicationName
} else {
appName = parent.name
}
variant.outputs.all { output ->
outputFileName = appName + "_V" + version + "_" + getVersionName() + ".apk"
}
}
sourceSets {
main {
//jniLibs.srcDir 'src/main/jniLibs'
}
}
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
packagingOptions {
//exclude 'lib/armeabi-v7a/libc++_shared.so' // 过滤该文件
}
}
String getDate() {
Date date = new Date();
return date.format("MMM dd yyyy HH:mm:ss", Locale.ENGLISH);
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'org.jetbrains:annotations:15.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'com.google.android.material:material:1.2.1'
//noinspection GradleCompatible
implementation 'com.android.support:recyclerview-v7:23.4.0'
// implementation files('libs/org.litepal.guolin_3.2.3.jar')
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.squareup.okhttp3:okhttp:4.1.0'
implementation 'com.squareup.okio:okio:1.9.0'
// implementation('com.jakewharton:butterknife:10.0.0') {
// exclude group: 'com.android.support'
// }
// annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'
implementation 'com.github.bumptech.glide:glide:4.0.0'
implementation 'androidx.appcompat:appcompat:1.3.0-alpha02'
//implementation files('libs\\photoview.jar')
implementation 'com.itextpdf:itext7-core:7.1.13'
// implementation 'com.github.barteksc:android-pdf-viewer:2.5.1'
//implementation 'com.github.barteksc:android-pdf-viewer:3.2.0-beta.1'
// implementation files('libs\\signature-pad.jar')
// implementation 'com.github.gcacace:signature-pad:1.3.1' // 或最新版本
implementation 'com.github.mhiew:android-pdf-viewer:3.2.0-beta.1'
// implementation files('libs\\dcm4che-core-5.27.0.jar')
// implementation files('libs\\dcm4che-net-5.27.0.jar')
implementation project(":ffmpeg")
// implementation files('libs\\wifilibrary.jar')
compileOnly files('syslibs/framework.jar')
// implementation("com.google.android.fhir:engine:1.0.0")
}