Download jniLibs as dependency, delete on clean (in gradle)
This commit is contained in:
parent
be6047066a
commit
629b626306
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -7,3 +7,4 @@
|
|||
*.apk
|
||||
build/
|
||||
.idea/
|
||||
app/src/main/jniLibs
|
||||
|
|
|
@ -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}"
|
||||
|
@ -228,3 +229,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") }
|
||||
println zipPath
|
||||
def zipFile = file(zipPath)
|
||||
def outputDir = file("${buildDir}/unpacked/dist")
|
||||
|
||||
from zipTree(zipFile)
|
||||
into outputDir
|
||||
|
||||
def src = new File(outputDir, "danars-support-lib-master")
|
||||
def target = file("src/main/jniLibs")
|
||||
target.mkdirs()
|
||||
|
||||
from src
|
||||
into target
|
||||
}
|
||||
|
||||
task full_clean(type: Delete) {
|
||||
delete file("src/main/jniLibs")
|
||||
}
|
||||
|
||||
clean.dependsOn full_clean
|
||||
preBuild.dependsOn unzip
|
|
@ -21,9 +21,17 @@ allprojects {
|
|||
maven {
|
||||
url "https://maven.google.com"
|
||||
}
|
||||
ivy {
|
||||
url 'https://github.com/'
|
||||
layout 'pattern', {
|
||||
artifact '/[organisation]/[module]/archive/[revision].[ext]'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue