download task

This commit is contained in:
AdrianLxM 2019-05-16 15:54:29 +02:00 committed by GitHub
parent 9a76f3386d
commit b173c1e793
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,6 +7,7 @@ buildscript {
dependencies { dependencies {
classpath 'io.fabric.tools:gradle:1.+' classpath 'io.fabric.tools:gradle:1.+'
classpath 'com.dicedmelon.gradle:jacoco-android:0.1.4' classpath 'com.dicedmelon.gradle:jacoco-android:0.1.4'
classpath 'de.undercouch:gradle-download-task:3.4.3'
} }
} }
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
@ -16,6 +17,8 @@ apply plugin: 'com.google.gms.google-services'
apply plugin: 'io.fabric' apply plugin: 'io.fabric'
apply plugin: 'jacoco-android' apply plugin: 'jacoco-android'
apply plugin: 'com.jakewharton.butterknife' apply plugin: 'com.jakewharton.butterknife'
apply plugin: 'de.undercouch.download'
jacoco { jacoco {
toolVersion = "0.8.3" toolVersion = "0.8.3"
@ -208,10 +211,6 @@ allprojects {
} }
} }
configurations {
libs
}
dependencies { dependencies {
wearApp project(':wear') wearApp project(':wear')
@ -221,7 +220,6 @@ dependencies {
implementation("com.crashlytics.sdk.android:crashlytics:2.9.9@aar") { implementation("com.crashlytics.sdk.android:crashlytics:2.9.9@aar") {
transitive = true; transitive = true;
} }
libs "MilosKozak:danars-support-lib:master@zip"
implementation 'androidx.appcompat:appcompat:1.0.2' implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.legacy:legacy-support-v13:1.0.0' implementation 'androidx.legacy:legacy-support-v13:1.0.0'
@ -283,29 +281,33 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
} }
//task unzip(type: Copy) {
// def zipPath = configurations.libs.find { it.name.startsWith("danars") }
// def zipFile = file(zipPath)
// def outputDir = file("${buildDir}/unpacked/dist")
// from zipTree(zipFile) task downloadZipFile(type: Download) {
// into outputDir src 'https://github.com/MilosKozak/danars-support-lib/archive/master.zip'
//} dest new File(buildDir, 'danars.zip')
}
//task copyLibs(dependsOn: unzip, type: Copy) { task downloadAndUnzipFile(dependsOn: downloadZipFile, type: Copy) {
// def src = file("${buildDir}/unpacked/dist/danars-support-lib-master") from zipTree(downloadZipFile.dest)
// def target = file("src/main/jniLibs/") def outputDir = file("${buildDir}/unpacked/dist")
into outputDir
}
// from src
// into target
//}
//task full_clean(type: Delete) { task copyLibs(dependsOn: downloadAndUnzipFile, type: Copy) {
// delete file("src/main/jniLibs") def src = file("${buildDir}/unpacked/dist/danars-support-lib-master")
//} def target = file("src/main/jniLibs/")
//clean.dependsOn full_clean from src
//preBuild.dependsOn copyLibs into target
}
task full_clean(type: Delete) {
delete file("src/main/jniLibs")
}
clean.dependsOn full_clean
preBuild.dependsOn copyLibs
printf('--------------\n') printf('--------------\n')
printf('isMaster: %s\n', isMaster().toString()) printf('isMaster: %s\n', isMaster().toString())