Alternate open source licenses plugin
This commit is contained in:
@@ -3,7 +3,7 @@ import org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile
|
||||
import java.text.SimpleDateFormat
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'com.google.android.gms.oss-licenses-plugin'
|
||||
apply plugin: 'com.jaredsburrows.license'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
apply plugin: 'kotlin-kapt'
|
||||
@@ -31,6 +31,13 @@ ext {
|
||||
}
|
||||
}
|
||||
|
||||
licenseReport {
|
||||
generateHtmlReport = true
|
||||
generateJsonReport = false
|
||||
|
||||
copyHtmlReportToAssets = true
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
buildToolsVersion '29.0.3'
|
||||
@@ -78,6 +85,9 @@ android {
|
||||
buildConfigField "boolean", "INCLUDE_UPDATER", "true"
|
||||
dimension "default"
|
||||
}
|
||||
fdroid {
|
||||
dimension "default"
|
||||
}
|
||||
dev {
|
||||
resConfigs "en", "xxhdpi"
|
||||
dimension "default"
|
||||
@@ -295,7 +305,22 @@ task copyResources(type: Copy) {
|
||||
include '**/*'
|
||||
}
|
||||
|
||||
preBuild.dependsOn(ktlintFormat, copyResources)
|
||||
// See https://github.com/jaredsburrows/gradle-license-plugin/issues/113
|
||||
task licenseReportPreBuild(type: Exec) {
|
||||
switch (getGradle().getStartParameter().getTaskRequests().toString()) {
|
||||
case ~/.*Standard.*/:
|
||||
commandLine '../gradlew', 'licenseStandardReleaseReport'
|
||||
break
|
||||
case ~/.*Fdroid.*/:
|
||||
commandLine '../gradlew', 'licenseFdroidReleaseReport'
|
||||
break
|
||||
case ~/.*Dev.*/:
|
||||
commandLine '../gradlew', 'licenseDevReleaseReport'
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
preBuild.dependsOn(ktlintFormat, copyResources, licenseReportPreBuild)
|
||||
|
||||
if (getGradle().getStartParameter().getTaskRequests().toString().contains("Standard")) {
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
|
||||
Reference in New Issue
Block a user