diff --git a/.gitignore b/.gitignore
index 93b8ea71f..b5ef6219e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,6 +11,7 @@
/build
*.apk
app/**/output.json
+open_source_licenses.html
# Hebrew assets are copied on build
app/src/main/res/values-iw/
diff --git a/app/build.gradle b/app/build.gradle
index 4969e70cd..3f4c8b137 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -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'
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 95e93bd14..544ca9d7f 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -124,13 +124,6 @@
android:name=".extension.util.ExtensionInstallActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
-
-
-