forked from facebookarchive/conceal
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
108 lines (89 loc) · 2.69 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.7.1+'
}
}
apply plugin: 'android-library'
android {
compileSdkVersion 19
buildToolsVersion "19.0.0"
defaultConfig {
minSdkVersion 9
targetSdkVersion 17
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['java']
jni.srcDirs = []
}
}
task ndkBuildRelease(type: Exec) {
commandLine 'ndk-build', '-C', file('native/crypto/').absolutePath,
'NDK_APPLICATION_MK=${PWD}/native/Application.mk',
'NDK_MODULE_PATH=${PWD}/native/third-party/',
'APP_BUILD_SCRIPT=${PWD}/native/crypto/Android.mk',
'NDK_OUT=${PWD}/build/ndk/release/obj',
'NDK_LIBS_OUT=${PWD}/build/bundles/release/jni'
}
tasks.withType(JavaCompile) {
compileTask -> compileTask.dependsOn ndkBuildRelease
}
}
// 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 = "1.0.0"
group = "com.facebook.conceal"
configurations {
archives {
extendsFrom configurations.default
}
}
signing {
required { has("release") && 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]'
}
}
}
}
}