forked from facebook/litho
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
78 lines (63 loc) · 2.06 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
/*
* Copyright (c) 2017-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
apply plugin: 'com.android.library'
apply plugin: 'maven'
project.group = GROUP
version = VERSION_NAME
android {
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
// We're on an old version of Robolectric which requires this, sadly.
useLibrary 'org.apache.http.legacy'
defaultConfig {
minSdkVersion rootProject.minSdkVersion
}
buildTypes {
def internalBuildField = 'IS_INTERNAL_BUILD'
def useIncrementalMountHelper = 'USE_INCREMENTAL_MOUNT_HELPER'
debug {
buildConfigField 'boolean', internalBuildField, 'true'
buildConfigField 'boolean', useIncrementalMountHelper, 'true'
}
release {
buildConfigField 'boolean', internalBuildField, 'false';
buildConfigField 'boolean', useIncrementalMountHelper, 'true'
}
}
// TODO(#62): Re-enable abort on error.
lintOptions {
abortOnError false
}
}
dependencies {
// Project dependencies
compileOnly project(':litho-annotations')
compileOnly project(':litho-stubs')
// Annotations
compileOnly deps.jsr305
// Infer annotations is partially class-retained and need to be part
// of the POM.
implementation deps.inferAnnotations
// Android Support Library
compileOnly deps.supportAnnotations
implementation deps.supportCoreUi
implementation deps.supportRecyclerView
// First-party dependencies
if (project.isRelease()) {
api deps.yoga
} else {
api project(':yogajni')
}
}
apply from: rootProject.file('gradle/release.gradle')
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
artifacts.add('archives', sourcesJar)