-
Notifications
You must be signed in to change notification settings - Fork 3.8k
/
Copy pathbuild.gradle
89 lines (72 loc) · 2.57 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
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import com.facebook.fresco.buildsrc.Deps
import com.facebook.fresco.buildsrc.GradleDeps
import com.facebook.fresco.buildsrc.TestDeps
apply plugin: 'com.android.library'
dependencies {
compileOnly Deps.AndroidX.androidxAnnotation
compileOnly Deps.AndroidX.legacySupportCoreUtils
compileOnly Deps.jsr305
compileOnly Deps.inferAnnotation
compileOnly Deps.javaxAnnotation
implementation project(':imagepipeline-base')
implementation Deps.SoLoader.nativeloader
implementation Deps.Bolts.tasks
implementation project(':fbcore')
testImplementation Deps.AndroidX.legacySupportCoreUtils
testImplementation Deps.jsr305
testImplementation TestDeps.junit
testImplementation TestDeps.festAssertCore
testImplementation TestDeps.mockitoCore
testImplementation(TestDeps.Powermock.apiMockito) {
exclude group: 'org.mockito', module: 'mockito-all'
}
testImplementation TestDeps.Powermock.moduleJunit4
testImplementation TestDeps.Powermock.moduleJunit4Rule
testImplementation TestDeps.Powermock.classloadingXstream
testImplementation(TestDeps.robolectric) {
exclude group: 'commons-logging', module: 'commons-logging'
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
}
}
// We download various C++ open-source dependencies from SourceForge into nativedeps/downloads.
// We then copy both downloaded code and our custom makefiles and headers into nativedeps/merge.
task fetchNativeDeps(dependsOn: [copyLibjpeg]) {
}
android {
ndkVersion GradleDeps.Native.version
def ndkLibs = [
['native-imagetranscoder', [copyLibjpeg]]]
buildToolsVersion FrescoConfig.buildToolsVersion
compileSdkVersion FrescoConfig.compileSdkVersion
namespace "com.facebook.nativeimagetranscoder"
defaultConfig {
minSdkVersion FrescoConfig.minSdkVersion
targetSdkVersion FrescoConfig.targetSdkVersion
}
sourceSets {
main {
jni.srcDirs = []
jniLibs.srcDirs = ndkLibs.collect { "$buildDir/${it[0]}" }
}
test {
resources {
exclude '**/BUCK'
}
}
}
lintOptions {
abortOnError false
}
ndkLibs.each { lib -> makeNdkTasks lib[0], lib[1] }
preBuild.dependsOn(
"ndk_build_native-imagetranscoder",
"copyLibjpeg"
)
}
apply plugin: "com.vanniktech.maven.publish"