forked from joshjdevl/libsodium-jni
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
133 lines (110 loc) · 3.37 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
120
121
122
123
124
125
126
127
128
129
130
131
132
apply plugin: 'maven'
apply plugin: 'com.android.library'
repositories {
mavenCentral()
mavenLocal()
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
lintOptions {
abortOnError false
}
// To let the libs be included in other projects
sourceSets {
main {
jniLibs.srcDirs = ['libs']
}
}
defaultConfig {
minSdkVersion 16
targetSdkVersion 23
versionCode project.VERSION_CODE.toInteger()
versionName project.VERSION_NAME
}
buildTypes {
release {
minifyEnabled false
}
}
}
dependencies {
// TODO are these required in this lib project?
//compile fileTree(include: ['*.jar'], dir: 'libs')
//compile 'com.android.support:appcompat-v7:23.1.1'
compile group: 'com.google.guava', name: 'guava', version: '19.0'
testCompile 'junit:junit:4.12'
}
buildscript {
System.properties['com.android.build.gradle.overrideVersionCheck'] = 'true'
repositories {
mavenCentral()
jcenter()
mavenLocal()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
}
}
uploadArchives {
repositories {
mavenDeployer {
//beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: hasProperty('ossrhUsername')?ossrhUsername:'', password: hasProperty('ossrhPassword')?ossrhPassword:'')
//authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: hasProperty('ossrhUsername')?ossrhUsername:'', password: hasProperty('ossrhPassword')?ossrhPassword:'')
//authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
name project.POM_NAME
packaging 'jar'
artifactId project.POM_ARTIFACT_ID
groupId project.GROUP
version project.VERSION_NAME
// optionally artifactId can be defined here
description project.POM_ARTIFACT_ID
//url 'https://github.com/joshjdevl/libsodium-jni'
scm {
connection 'scm:[email protected]:joshjdevl/libsodium-jni.git'
developerConnection 'scm:[email protected]:joshjdevl/libsodium-jni.git'
url 'https://github.com/joshjdevl/libsodium-jni'
}
licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'joshjdevl'
name 'joshjdevl'
email '[email protected]'
}
}
}
}
}
}
task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}
artifacts {
archives javadocJar, sourcesJar
}