Merge pull request #639 from triplem/cleanup_libs

Remove jniLibs, download on build
This commit is contained in:
Milos Kozak 2018-02-04 18:18:39 +01:00 committed by GitHub
commit 1471d2bcd5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 32 additions and 0 deletions

1
.gitignore vendored
View file

@ -7,3 +7,4 @@
*.apk
build/
.idea/
app/src/main/jniLibs

View file

@ -179,6 +179,7 @@ dependencies {
compile("com.crashlytics.sdk.android:answers:1.3.12@aar") {
transitive = true;
}
compile 'MilosKozak:danars-support-lib:master@zip'
compile "com.android.support:appcompat-v7:${supportLibraryVersion}"
compile "com.android.support:support-v4:${supportLibraryVersion}"
@ -231,3 +232,27 @@ dependencies {
androidTestCompile "com.google.dexmaker:dexmaker:${dexmakerVersion}"
androidTestCompile "com.google.dexmaker:dexmaker-mockito:${dexmakerVersion}"
}
task unzip(type: Copy) {
def zipPath = configurations.compile.find {it.name.startsWith("danars") }
def zipFile = file(zipPath)
def outputDir = file("${buildDir}/unpacked/dist")
from zipTree(zipFile)
into outputDir
}
task copyLibs(dependsOn: unzip, type: Copy) {
def src = file("${buildDir}/unpacked/dist/danars-support-lib-master")
def target = file("src/main/jniLibs/")
from src
into target
}
task full_clean(type: Delete) {
delete file("src/main/jniLibs")
}
clean.dependsOn full_clean
preBuild.dependsOn copyLibs

View file

@ -21,6 +21,12 @@ allprojects {
maven {
url "https://maven.google.com"
}
ivy {
url 'https://github.com/'
layout 'pattern', {
artifact '/[organisation]/[module]/archive/[revision].[ext]'
}
}
}
}