|
| 1 | +apply plugin: 'com.android.application' |
| 2 | +apply plugin: 'kotlin-android' |
| 3 | +apply plugin: 'kotlin-kapt' |
| 4 | +kapt { |
| 5 | + correctErrorTypes = true |
| 6 | +} |
| 7 | +apply plugin: 'kotlin-parcelize' |
| 8 | + |
| 9 | +buildscript { |
| 10 | + repositories { |
| 11 | + google() |
| 12 | + mavenCentral() |
| 13 | + } |
| 14 | +} |
| 15 | + |
| 16 | +android { |
| 17 | + namespace 'com.baidu.duer.files' |
| 18 | + compileSdkVersion 33 |
| 19 | + ndkVersion '25.1.8937393' |
| 20 | + buildToolsVersion '33.0.0' |
| 21 | + sourceSets { |
| 22 | + main.jniLibs.srcDirs = ['libs'] |
| 23 | + } |
| 24 | + defaultConfig { |
| 25 | + applicationId 'com.baidu.duer.filemanager' |
| 26 | + minSdkVersion 26 |
| 27 | + // Not supporting notification runtime permission yet. |
| 28 | + // noinspection OldTargetApi |
| 29 | + targetSdkVersion 32 |
| 30 | + versionCode VERSION_CODE as int |
| 31 | + versionName VERSION_NAME as String |
| 32 | + resValue 'string', 'app_version', versionName + ' (' + versionCode + ')' |
| 33 | + buildConfigField 'String', 'FILE_PROVIDIER_AUTHORITY', 'APPLICATION_ID + ".file_provider"' |
| 34 | + buildConfigField 'String', 'URI_PROVIDIER_AUTHORITY', 'APPLICATION_ID + ".uri_provider"' |
| 35 | + resValue 'string', 'app_provider_authority', applicationId + '.app_provider' |
| 36 | + resValue 'string', 'file_provider_authority', applicationId + '.file_provider' |
| 37 | + resValue 'string', 'uri_provider_authority', applicationId + '.uri_provider' |
| 38 | + |
| 39 | + javaCompileOptions { |
| 40 | + annotationProcessorOptions { |
| 41 | + arguments = ["room.schemaLocation": |
| 42 | + "$projectDir/schemas".toString()] |
| 43 | + } |
| 44 | + } |
| 45 | + |
| 46 | + // FileManager Apk主进程CrabKey |
| 47 | + buildConfigField "String", "crab_key", "\"eafe1624018ec5a8\"" |
| 48 | + } |
| 49 | + applicationVariants.all { variant -> |
| 50 | + variant.outputs.all { output -> |
| 51 | + if (variant.buildType.name == 'release' || variant.buildType.name == 'debug') { |
| 52 | + def fileName = "FileManager_${variant.buildType.name}_${VERSION_NAME}.apk" |
| 53 | + outputFileName = fileName |
| 54 | + } |
| 55 | + } |
| 56 | + } |
| 57 | + buildFeatures { |
| 58 | + viewBinding true |
| 59 | + } |
| 60 | + compileOptions { |
| 61 | + sourceCompatibility JavaVersion.VERSION_1_8 |
| 62 | + targetCompatibility JavaVersion.VERSION_1_8 |
| 63 | + } |
| 64 | + externalNativeBuild { |
| 65 | + cmake { |
| 66 | + path 'CMakeLists.txt' |
| 67 | + } |
| 68 | + } |
| 69 | + dataBinding { |
| 70 | + enabled = true |
| 71 | + } |
| 72 | + buildTypes { |
| 73 | + release { |
| 74 | + minifyEnabled true |
| 75 | + shrinkResources true |
| 76 | + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' |
| 77 | + // 因为APK会在Jenkins平台签v2签名(Sin_Apps_v2)因此工程中不配置签名 |
| 78 | + } |
| 79 | + } |
| 80 | + packagingOptions { |
| 81 | + resources { |
| 82 | + excludes += ['META-INF/DEPENDENCIES'] |
| 83 | + } |
| 84 | + } |
| 85 | + lint { |
| 86 | + warning 'InvalidPackage', 'MissingTranslation' |
| 87 | + } |
| 88 | +} |
| 89 | + |
| 90 | +repositories { |
| 91 | + maven { |
| 92 | + url 'https://jitpack.io' |
| 93 | + } |
| 94 | +} |
| 95 | + |
| 96 | +dependencies { |
| 97 | + |
| 98 | + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' |
| 99 | + implementation fileTree(dir: 'libs', include: ['*.jar']) |
| 100 | + |
| 101 | + // kotlinx-coroutines-android depends on kotlin-stdlib-jdk8 |
| 102 | + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" |
| 103 | + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$KOTLINX_COROUTINES_VERSION" |
| 104 | + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$KOTLINX_COROUTINES_VERSION" |
| 105 | + |
| 106 | + implementation 'androidx.appcompat:appcompat:1.5.1' |
| 107 | + implementation 'androidx.core:core-ktx:1.9.0' |
| 108 | + implementation 'androidx.exifinterface:exifinterface:1.3.5' |
| 109 | + implementation 'androidx.fragment:fragment-ktx:1.5.5' |
| 110 | + |
| 111 | + implementation "androidx.lifecycle:lifecycle-common-java8:$ANDROIDX_LIFECYCLE_VERSION" |
| 112 | + implementation "androidx.lifecycle:lifecycle-livedata-ktx:$ANDROIDX_LIFECYCLE_VERSION" |
| 113 | + implementation "androidx.lifecycle:lifecycle-process:$ANDROIDX_LIFECYCLE_VERSION" |
| 114 | + implementation "androidx.lifecycle:lifecycle-runtime-ktx:$ANDROIDX_LIFECYCLE_VERSION" |
| 115 | + implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$ANDROIDX_LIFECYCLE_VERSION" |
| 116 | + implementation 'androidx.preference:preference-ktx:1.2.0' |
| 117 | + implementation 'androidx.recyclerview:recyclerview:1.2.1' |
| 118 | + implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' |
| 119 | + implementation 'com.google.android.material:material:1.7.0' |
| 120 | + |
| 121 | + implementation 'com.github.chrisbanes:PhotoView:2.3.0' |
| 122 | + releaseImplementation 'com.github.mypplication:stetho-noop:1.1' |
| 123 | + implementation 'com.github.topjohnwu.libsu:service:5.0.3' |
| 124 | + implementation 'com.caverock:androidsvg-aar:1.4' |
| 125 | + implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.10.0' |
| 126 | + implementation 'com.drakeet.drawer:drawer:1.0.3' |
| 127 | + debugImplementation 'com.facebook.stetho:stetho:1.6.0' |
| 128 | + implementation 'com.h6ah4i.android.materialshadowninepatch:materialshadowninepatch:1.0.0' |
| 129 | + implementation 'com.h6ah4i.android.widget.advrecyclerview:advrecyclerview:1.0.0' |
| 130 | + implementation('com.hierynomus:smbj:0.11.5') { |
| 131 | + exclude group: 'org.bouncycastle', module: 'bcprov-jdk15on' |
| 132 | + } |
| 133 | + implementation('com.hierynomus:sshj:0.32.0') { |
| 134 | + exclude group: 'org.bouncycastle', module: 'bcprov-jdk15on' |
| 135 | + } |
| 136 | + implementation 'com.jakewharton.threetenabp:threetenabp:1.4.0' |
| 137 | + implementation 'com.leinardi.android:speed-dial:3.1.1' |
| 138 | + implementation('com.rapid7.client:dcerpc:0.12.0') { |
| 139 | + exclude group: 'org.bouncycastle', module: 'bcprov-jdk15on' |
| 140 | + } |
| 141 | + implementation 'org.bouncycastle:bcprov-jdk15to18:1.70' |
| 142 | + implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava' |
| 143 | + implementation 'com.takisoft.preferencex:preferencex:1.1.0' |
| 144 | + implementation 'commons-net:commons-net:3.8.0' |
| 145 | + |
| 146 | + implementation 'de.psdev.licensesdialog:licensesdialog:2.1.0' |
| 147 | + |
| 148 | + implementation 'dev.chrisbanes:insetter-ktx:0.3.1' |
| 149 | + implementation 'dev.rikka.rikkax.preference:simplemenu-preference:1.0.3' |
| 150 | + implementation 'dev.rikka.shizuku:api:12.0.0' |
| 151 | + implementation 'eu.agno3.jcifs:jcifs-ng:2.1.6' |
| 152 | + def coil_version = '2.2.2' |
| 153 | + implementation "io.coil-kt:coil:$coil_version" |
| 154 | + implementation "io.coil-kt:coil-gif:$coil_version" |
| 155 | + implementation "io.coil-kt:coil-svg:$coil_version" |
| 156 | + implementation "io.coil-kt:coil-video:$coil_version" |
| 157 | + implementation 'me.zhanghai.android.appiconloader:appiconloader:1.5.0' |
| 158 | + implementation 'me.zhanghai.android.fastscroll:library:1.1.8' |
| 159 | + implementation 'me.zhanghai.android.foregroundcompat:library:1.0.2' |
| 160 | + implementation 'me.zhanghai.android.libselinux:library:2.1.0' |
| 161 | + implementation 'me.zhanghai.android.retrofile:library:1.1.1' |
| 162 | + implementation 'me.zhanghai.android.systemuihelper:library:1.0.0' |
| 163 | + implementation 'net.sourceforge.streamsupport:android-retrostreams:1.7.4' |
| 164 | + implementation 'org.apache.commons:commons-compress:1.20' |
| 165 | + // Optional dependency of Commons Compress for 7Z LZMA. |
| 166 | + implementation 'org.tukaani:xz:1.9' |
| 167 | + implementation 'org.apache.ftpserver:ftpserver-core:1.2.0' |
| 168 | + implementation('org.apache.mina:mina-core') { |
| 169 | + version { |
| 170 | + strictly '2.1.3' |
| 171 | + } |
| 172 | + } |
| 173 | + implementation "io.reactivex.rxjava3:rxjava:3.1.6" |
| 174 | + implementation 'com.github.junrar:junrar:7.4.1' |
| 175 | + |
| 176 | + implementation("androidx.room:room-runtime:$ROOM_VERSION") |
| 177 | + annotationProcessor("androidx.room:room-compiler:$ROOM_VERSION") |
| 178 | + kapt("androidx.room:room-compiler:$ROOM_VERSION") |
| 179 | + implementation "androidx.room:room-ktx:$ROOM_VERSION" |
| 180 | + implementation 'io.github.scwang90:refresh-layout-kernel:2.0.5' |
| 181 | + implementation 'io.github.scwang90:refresh-header-classics:2.0.5' |
| 182 | + implementation 'com.github.penfeizhou.android.animation:awebp:2.24.0' |
| 183 | + implementation 'io.github.jeremyliao:live-event-bus-x:1.8.0' |
| 184 | +} |
0 commit comments