This repository has been archived by the owner on Mar 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 429
/
build.gradle
119 lines (97 loc) · 2.88 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
}
}
apply plugin: 'com.android.library'
android {
repositories {
mavenCentral()
}
dependencies {
compile 'com.google.code.findbugs:jsr305:3.0.2'
}
compileSdkVersion 23
buildToolsVersion "25.0.0"
defaultConfig {
minSdkVersion 9
targetSdkVersion 17
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = [
'first-party/fbjni/java',
'first-party/proguard/annotations',
'first-party/soloader',
'java']
jniLibs.srcDir 'libs'
jni.srcDirs = []
}
}
task ndkBuildRelease(type: Exec) {
commandLine "$System.env.ANDROID_NDK/ndk-build",
'-C', file('.').absolutePath,
'NDK_APPLICATION_MK=${PWD}/native/Application.mk',
'NDK_MODULE_PATH=${PWD}/native:${PWD}/first-party/fbjni/native:${PWD}/third-party',
'APP_BUILD_SCRIPT=${PWD}/native/jni/Android.mk'
}
tasks.withType(JavaCompile) {
compileTask -> compileTask.dependsOn ndkBuildRelease
}
lintOptions {
abortOnError false
}
}
// Configure gradle.properties to do maven builds
if (!project.hasProperty('sonatypeRepo') ||
!project.hasProperty('sonatypeUsername') ||
!project.hasProperty('sonatypePassword')) {
return;
}
// Maven Push
apply plugin: 'maven'
apply plugin: 'signing'
version = "2.0.2"
group = "com.facebook.conceal"
signing {
required { gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
}
uploadArchives {
configuration = configurations.archives
repositories.mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: sonatypeRepo) {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}
pom.project {
name 'Conceal'
packaging 'aar'
description 'Conceal is an easy to use, performant crypto library for android.'
url 'http://facebook.github.io/conceal'
scm {
url 'scm:[email protected]:facebook/conceal.git'
connection 'scm:[email protected]:facebook/conceal.git'
developerConnection 'scm:[email protected]:facebook/conceal.git'
}
licenses {
license {
name 'BSD 2-Clause License'
url 'https://github.com/facebook/conceal/blob/master/LICENSE'
distribution 'repo'
}
}
developers {
developer {
id 'subodh'
name 'Subodh Iyengar'
email '[email protected]'
}
}
}
}
}