-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
70 lines (65 loc) · 1.83 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
apply plugin: 'com.android.library'
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:3.1.1'
}
}
android {
compileSdkVersion 25
buildToolsVersion '25.0.0'
defaultConfig {
targetSdkVersion 25
minSdkVersion 4
versionCode 1
versionName "1.0.4"
}
sourceSets {
main {
jni.srcDirs = []
jniLibs.srcDirs = ['src/main/libs/']
}
}
archivesBaseName = getName()
version = '1.0.' + (System.getenv('BUILD_NUMBER') ? System.getenv('BUILD_NUMBER') : '0-LOCAL')
//rename the aar to {archivesBaseName}-{version}.aar
libraryVariants.all { variant ->
variant.outputs.each { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith('.aar')) {
def fileName = "${archivesBaseName}-${version}.aar"
output.outputFile = new File(outputFile.parent, fileName)
}
}
}
}
// call regular ndk-build(.cmd) script from app directory
task ndkBuild(type: Exec) {
String ndkDir = android.ndkDirectory
commandLine "$ndkDir/ndk-build.cmd", '-j8', '-C', file('src/main/jni').absolutePath
}
tasks.withType(JavaCompile) {
compileTask -> compileTask.dependsOn ndkBuild
}
task cleanExtra(type: Delete) {
delete 'src/main/obj'
}
clean.dependsOn(cleanExtra)
group = 'me.everything'
apply plugin: 'com.jfrog.artifactory-upload'
dependencies {
}
repositories {
maven {
url 'https://maven.google.com/'
name 'Google'
}
}