-
Notifications
You must be signed in to change notification settings - Fork 47
/
build.gradle
98 lines (82 loc) · 2.36 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0-rc1'
}
}
apply plugin: 'com.android.library'
android {
compileSdkVersion 21
buildToolsVersion "21.1"
defaultConfig {
minSdkVersion 8
targetSdkVersion 21
}
sourceSets {
main {
jniLibs.srcDirs = ['src/main/libs']
jni.srcDirs = []
}
}
}
task ndkBuild(type: Exec) {
File ndkDir = project.getPlugins().getPlugin('android-library').ndkFolder
if (ndkDir == null || !ndkDir.isDirectory()) {
throw new GradleException("NDK is not configured")
}
String ndkBuild = ndkDir.absolutePath + File.separator + 'ndk-build'
commandLine ndkBuild, '-C', 'src/main'
}
tasks.withType(JavaCompile) {
compileTask -> compileTask.dependsOn ndkBuild
}
apply plugin: 'maven'
apply plugin: 'signing'
version = "1.0.3"
group = "com.litl"
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 'Android LevelDB JNI'
packaging 'aar'
description 'Android NDK bindings for LevelDB'
url 'https://github.com/litl/android-leveldb'
scm {
url 'scm:git@github.com:litl/android-leveldb.git'
connection 'scm:git@github.com:litl/android-leveldb.git'
developerConnection 'scm:git@github.com:litl/android-leveldb.git'
}
licenses {
license {
name 'BSD-style'
url 'http://opensource.org/licenses/BSD-3-Clause'
distribution 'repo'
}
}
developers {
developer {
id 'tingo'
name 'Tambet Ingo'
email 'tingo@litl.com'
}
}
}
}
}