forked from mrmaffen/vlc-android-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
71 lines (59 loc) · 1.8 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.0'
classpath 'org.ajoberstar:gradle-git:0.8.0'
}
}
apply plugin: 'com.android.library'
android {
compileSdkVersion 22
buildToolsVersion '22.0.1'
defaultConfig {
minSdkVersion 9
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
allprojects {
version = VERSION_NAME
group = GROUP
repositories {
mavenCentral()
}
}
import org.ajoberstar.grgit.*
project.ext.androidAbi = System.getenv()['ANDROID_ABI']
project.ext.vlcSource = file('vlc-android-' + project.ext.androidAbi)
task cloneVlcAndroid << {
Grgit.clone(uri: 'http://git.videolan.org/git/vlc-ports/android.git', dir: project.ext.vlcSource)
}
// Only clone once.
cloneVlcAndroid.onlyIf { !project.ext.vlcSource.exists() }
task updateVlcCheckout(dependsOn: 'cloneVlcAndroid') << {
def repo = Grgit.open(project.ext.vlcSource)
repo.pull(rebase: true)
}
task buildVlc(type: Exec, dependsOn: 'updateVlcCheckout') {
workingDir project.ext.vlcSource
commandLine './compile.sh'
}
task copyJniLibs(type: Copy, dependsOn: 'buildVlc') {
from ('vlc-android-' + project.ext.androidAbi + '/libvlc/jni/libs/')
into ('src/main/jniLibs/')
}
task updateVlc(type: Copy, dependsOn: 'copyJniLibs') {
from ('vlc-android-' + project.ext.androidAbi + '/libvlc/src/')
into ('src/main/java/')
}
//upload aar to maven central with sonatype
apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/8cfffbbff6b9094af1c92318ea5d5a5bb0b8bb30/gradle-mvn-push.gradle'