-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.gradle
121 lines (107 loc) · 3.53 KB
/
build.gradle
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
apply plugin: 'com.android.library'
repositories {
google()
mavenCentral()
mavenLocal()
maven { url 'https://jitpack.io' }
}
allprojects {
gradle.projectsEvaluated {
tasks.withType(JavaCompile).configureEach {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
// to generate the required jar dependencies e.g. cling seamless
preBuild.dependsOn(ndkBuild)
}
}
android {
namespace 'com.archos.filecorelibrary'
compileSdk 34
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
//tmp prebuilt jni
jniLibs.srcDirs = ['libs']
//disable automatic jni build rules
jni.srcDirs = []
}
}
defaultConfig {
minSdkVersion 21
targetSdkVersion 34
multiDexEnabled true
}
tasks.withType(JavaCompile).configureEach {
compileTask -> compileTask.dependsOn ndkBuild
}
clean.dependsOn 'ndkClean'
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
}
}
compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
buildFeatures {
renderScript true
aidl true
}
}
tasks.register('ndkBuild', Exec) {
workingDir = "../"
outputs.upToDateWhen {
file("libs/arm64-v8a/libc++_shared.so").exists()
file("libs/armeabi-v7a/libc++_shared.so").exists()
file("libs/x86/libc++_shared.so").exists()
file("libs/x86_64/libc++_shared.so").exists()
//file("libs/jcifs-ng.jar").exists()
}
//OutputFiles/OutputDirectories
List<String> myCmd = new ArrayList<String>()
myCmd.add("make")
myCmd.add("native_libnativehelper")
myCmd.add("native_build_FileCoreLibrary")
//myCmd.add("jcifs-ng")
commandLine myCmd
}
tasks.register('ndkClean', Exec) {
workingDir = "../"
List<String> myCmd = new ArrayList<String>()
myCmd.add("make")
myCmd.add("native_clean")
//myCmd.add("external_clean_jcifs-ng")
commandLine myCmd
}
// ensure there is no loggers other than logback
configurations.configureEach {
exclude group: "org.slf4j", module: "slf4j-log4j12"
exclude group: "log4j", module: "log4j"
}
dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.2'
api 'eu.agno3.jcifs:jcifs-ng:2.1.10'
api 'com.github.mwiede:jsch:0.2.20'
// desugar is needed no avoid commons-net java.time.Duration ClassNotFoundException after 3.8.0
implementation 'commons-net:commons-net:3.11.1'
implementation 'com.jakewharton.threetenabp:threetenabp:1.4.7'
implementation 'com.github.nova-video-player:sardine-android:0.0.2'
implementation 'com.hierynomus:smbj:0.13.0'
implementation 'com.hierynomus:sshj:0.38.0'
implementation 'oro:oro:2.0.8'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'androidx.preference:preference:1.2.1'
implementation 'org.slf4j:slf4j-api:2.0.13'
implementation 'com.github.tony19:logback-android:3.0.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0'
implementation 'io.sentry:sentry:7.16.0'
}