-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild.gradle
162 lines (146 loc) · 5.29 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
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
152
153
154
155
156
157
158
159
160
161
162
apply plugin: 'com.android.library'
repositories {
google()
mavenCentral()
mavenLocal()
}
ext {
groupOpen = false
// jetty required by jupnp and going above 9.4.14 requires minSdkVersion 26
}
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)
}
}
configurations {
configureEach {
exclude group: 'org.json', module: 'json'
}
}
android {
namespace 'com.archos.medialib'
compileSdk 34
gradle.startParameter.getTaskNames().each { task ->
if (task.contains("Open")) {
groupOpen = true
}
}
compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
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']
}
}
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'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/beans.xml'
exclude 'META-INF/maven'
exclude 'README'
}
buildFeatures {
renderScript true
aidl true
}
}
tasks.register('ndkBuild', Exec) {
workingDir = "../"
List<String> myCmd = new ArrayList<String>()
myCmd.add("make")
myCmd.add("native_libyuv")
myCmd.add("native_libnativehelper")
myCmd.add("native_avos_full")
myCmd.add("native_torrentd")
commandLine myCmd
}
tasks.register('ndkClean', Exec) {
workingDir = "../"
List<String> myCmd = new ArrayList<String>()
myCmd.add("make")
myCmd.add("native_clean")
commandLine myCmd
}
def useSan = false
if (useSan)
apply from: 'profiling.gradle'
dependencies {
implementation project(':FileCoreLibrary')
implementation 'androidx.lifecycle:lifecycle-process:2.8.7'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.4'
implementation 'androidx.core:core:1.13.1'
implementation 'androidx.legacy:legacy-support-core-utils:1.0.0'
implementation 'androidx.media:media:1.7.0'
implementation 'androidx.fragment:fragment:1.8.5'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'androidx.preference:preference:1.2.1'
implementation 'org.apache.httpcomponents.client5:httpclient5:5.4.1'
implementation 'org.json:json:20240303'
// see https://github.com/UweTrottmann/trakt-java?tab=readme-ov-file for threetenabp instead of threetenbp
implementation ('com.uwetrottmann.trakt5:trakt-java:6.16.0') {
exclude group: 'org.threeten', module: 'threetenbp'
}
implementation 'com.jakewharton.threetenabp:threetenabp:1.4.8'
api ('org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.2') {
exclude group:'org.apache.oltu.oauth2' , module: 'org.apache.oltu.oauth2.common'
}
implementation 'commons-codec:commons-codec:1.17.1'
implementation 'org.apache.commons:commons-text:1.12.0'
// version aligned with external dependencies trakt-java tmdb-java (check pom.xml)
implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0'
// stick with 2.10.0 since errors are showing up in sentry when using 2.11.0
implementation 'com.uwetrottmann.tmdb2:tmdb-java:2.11.0'
// all below is linked to cling, jetty version locked to latest 8.1
api 'com.github.nova-video-player.cling:cling-core:2.1.7'
implementation 'com.github.nova-video-player.cling:cling-support:2.1.7'
implementation 'com.github.nova-video-player.seamless:seamless-swing:1.1.4'
implementation 'com.github.nova-video-player.seamless:seamless-xml:1.1.4'
implementation 'com.github.nova-video-player.seamless:seamless-util:1.1.4'
implementation 'com.github.nova-video-player.seamless:seamless-http:1.1.4'
implementation 'javax.servlet:javax.servlet-api:4.0.1'
// version aligned with cling dependencies
implementation ('org.eclipse.jetty:jetty-server:8.1.22.v20160922') {
exclude group: 'org.eclipse.jetty.orbit', module: 'javax.servlet'
}
implementation ('org.eclipse.jetty:jetty-servlet:8.1.22.v20160922') {
exclude group: 'org.eclipse.jetty.orbit', module: 'javax.servlet'
}
implementation ('org.eclipse.jetty:jetty-client:8.1.22.v20160922') {
exclude group: 'org.eclipse.jetty.orbit', module: 'javax.servlet'
}
implementation 'io.sentry:sentry:7.19.1'
}