Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Gradle Kotlin DSL #3249

Merged
merged 19 commits into from
Aug 5, 2023
Merged

Migrate to Gradle Kotlin DSL #3249

merged 19 commits into from
Aug 5, 2023

Conversation

iBotPeaches
Copy link
Owner

@iBotPeaches iBotPeaches commented Aug 2, 2023

fixes: #3245

  • Migrate to Kotlin
  • Dependencies that Dependabot can migrate
  • Maven Publish
  • Proguard
  • Empty Build Directory
  • Properly process framework jar
  • Properly replace properties file
  • License check/format - not possible
  • inline functions file

@iBotPeaches
Copy link
Owner Author

The license plugin doesn't really work in Kotlin DSL and is abandoned. I couldn't find an alternative. So will attach a patch and revisit. Not to worried about license headers in files.

Index: build.gradle.kts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/build.gradle.kts b/build.gradle.kts
--- a/build.gradle.kts	(revision 4469973fc700b89ee4f5834289d8e51841cacdc6)
+++ b/build.gradle.kts	(date 1691149714052)
@@ -1,3 +1,4 @@
+import nl.javadude.gradle.plugins.license.LicenseExtension
 import java.io.ByteArrayOutputStream
 
 val baksmaliVersion by extra("3.0.3")
@@ -42,11 +43,31 @@
 }
 
 allprojects {
+    apply(plugin = "com.github.hierynomus.license")
+
     repositories {
         mavenCentral()
         google()
     }
+
+    configure<LicenseExtension> {
+        header = rootProject.file("brut.j.common/src/templates/HEADER.txt")
+        exclude("**/android/content/res/*.java")
+        exclude("**/android/util/*.java")
+        include("**/*.java")
+        mapping(mapOf("java" to "SLASHSTAR_STYLE"))
+        skipExistingHeaders = true
+        strictCheck = true
+
+        ext.set("year", 2010)
+        ext.set("brut", "Ryszard Wiśniewski")
+        ext.set("brutEmail", "[email protected]")
+        ext.set("ibot", "Connor Tumbleson")
+        ext.set("ibotEmail", "[email protected]")
+    }
 }
+
+gradle.startParameter.excludedTaskNames += listOf("licenseFormatMain", "licenseFormatTest")
 
 subprojects {
     apply(plugin = "java")
@@ -109,4 +130,3 @@
     mavenVersion = version
     project.logger.lifecycle("Building RELEASE (${gitBranch}): ${apktoolVersion}}")
 }
-

@iBotPeaches iBotPeaches marked this pull request as ready for review August 5, 2023 01:07
@iBotPeaches iBotPeaches merged commit 342ff67 into master Aug 5, 2023
@iBotPeaches iBotPeaches deleted the kotlin-refactor branch August 5, 2023 10:28
iBotPeaches added a commit that referenced this pull request Aug 5, 2023
@iBotPeaches iBotPeaches added this to the v2.8.2 milestone Aug 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant