From: Sunil Mohan Adapa <sunil@medhas.org>
Date: Sat, 1 May 2021 07:54:52 -0700
Subject: Alter gradle build system to suite Debian

The following parts of the build system were disabled as they are not relevant
in Debian and disabling them makes packaging easier.

Eclipse plugin generates a project file that can be opened in Eclipse IDE.

Coveralls and Jacoco analyze and report the test coverage so that upstream can
work on improving automated tests.

Error Prone and Checksytle indicate potential coding errors.

Animal Sniffer helps with ensuring that project runs on multiple versions of
Java.

Android component appears to need Android SDK.

REPL component allows developers to play with the library and is not necessary
for reverse depending packages.

Running tests is disabled until all dependencies are avialable and they can be
run reliably. Enable tests if future.

Forwarded: not-needed
---
 build.gradle    | 48 ++++++++++++++++++++++++------------------------
 settings.gradle |  4 ++--
 2 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/build.gradle b/build.gradle
index 102f837..2d5b566 100644
--- a/build.gradle
+++ b/build.gradle
@@ -8,22 +8,22 @@ buildscript {
         mavenCentral()
     }
 
-    dependencies {
-		classpath "org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.3.1"
-    }
+    // dependencies {
+    //     	classpath "org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.3.1"
+    // }
 }
 
 plugins {
-    id 'ru.vyarus.animalsniffer' version '1.5.1'
-	id 'net.ltgt.errorprone' version '0.8.1'
+    // id 'ru.vyarus.animalsniffer' version '1.5.1'
+	// id 'net.ltgt.errorprone' version '0.8.1'
 }
 
 allprojects {
 	apply plugin: 'java'
-	apply plugin: 'eclipse'
-	apply plugin: 'checkstyle'
-	apply plugin: 'jacoco'
-	apply plugin: 'net.ltgt.errorprone'
+	// apply plugin: 'eclipse'
+	// apply plugin: 'checkstyle'
+	// apply plugin: 'jacoco'
+	// apply plugin: 'net.ltgt.errorprone'
 
 	group = 'org.minidns'
 	description = "A minimal DNS client library with support for A, AAAA, NS and SRV records"
@@ -33,7 +33,7 @@ allprojects {
 		isSnapshot = version.endsWith('-SNAPSHOT')
 		minidnsMinAndroidSdk = 19
 		junitVersion = '5.5.2'
-		androidBootClasspath = getAndroidRuntimeJar(minidnsMinAndroidSdk)
+		// androidBootClasspath = getAndroidRuntimeJar(minidnsMinAndroidSdk)
 		rootConfigDir = new File(rootDir, 'config')
 		gitCommit = getGitCommit()
 		builtDate = (new java.text.SimpleDateFormat("yyyy-MM-dd")).format(new Date())
@@ -49,7 +49,7 @@ allprojects {
 
 	sourceCompatibility = javaCompatilibity
 
-	if (!ext.isSnapshot && !'git describe --exact-match HEAD'.execute().text.trim().equals(version)) {
+	/* if (!ext.isSnapshot && !'git describe --exact-match HEAD'.execute().text.trim().equals(version)) {
 		throw new org.gradle.api.InvalidUserDataException('Untagged version detected! Please tag every release.')
 	}
 	if (!version.endsWith('-SNAPSHOT') && version != 'git tag --points-at HEAD'.execute().text.trim()) {
@@ -69,7 +69,7 @@ allprojects {
 			events "failed"
 			exceptionFormat "full"
 		}
-	}
+	} */
 
 	repositories {
 		mavenLocal()
@@ -93,7 +93,7 @@ allprojects {
 			'-Xlint:-options',
 			'-Werror',
 		]
-		options.errorprone {
+		/* options.errorprone {
 			error(
 				"UnusedVariable",
 				"UnusedMethod",
@@ -110,11 +110,11 @@ allprojects {
 				'-Xep:MixedMutabilityReturnType:OFF',
 				'-Xep:ImmutableEnumChecker:OFF',
 			]
-		}
+		} */
 
 	}
 
-	checkstyle {
+	/* checkstyle {
 		toolVersion = '8.24'
 	}
 
@@ -135,7 +135,7 @@ allprojects {
 		classpath {
 			downloadJavadoc = true
 		}
-	}
+	} */
 
 	// Make all project's 'test' targets depend on javadoc, so that
 	// javadoc is also linted.
@@ -167,14 +167,14 @@ allprojects {
 		}
 	}
 
-	dependencies {
+	/* dependencies {
 		testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
 		testImplementation "org.junit.jupiter:junit-jupiter-params:$junitVersion"
 		testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
 
 		errorprone 'com.google.errorprone:error_prone_core:2.3.3'
 		errorproneJavac('com.google.errorprone:javac:9+181-r4173-1')
-	}
+	} */
 
 }
 
@@ -203,7 +203,7 @@ subprojects {
 		testRuntime testsJar
 	}
 
-	publishing {
+	/* publishing {
 		publications {
 			mavenJava(MavenPublication) {
 				from components.java
@@ -270,10 +270,10 @@ subprojects {
 		required { signingRequired }
 		useGpgCmd()
 		sign publishing.publications.mavenJava
-	}
+	} */
 }
 
-configure(subprojects.findAll{!it.name.endsWith('-java7') && !it.name.endsWith('-android21')}) {
+/* configure(subprojects.findAll{!it.name.endsWith('-java7') && !it.name.endsWith('-android21')}) {
    apply plugin: 'ru.vyarus.animalsniffer'
    dependencies {
        signature "net.sf.androidscents.signature:android-api-level-${minidnsMinAndroidSdk}:4.4.2_r4@signature"
@@ -281,14 +281,14 @@ configure(subprojects.findAll{!it.name.endsWith('-java7') && !it.name.endsWith('
    animalsniffer {
        sourceSets = [sourceSets.main]
    }
-}
+} */
 
 jar {
 	// Root project should not create empty jar artifact
 	enabled = false
 }
 
-apply plugin: "com.github.kt3k.coveralls"
+/* apply plugin: "com.github.kt3k.coveralls"
 coveralls {
 	sourceDirs = files(subprojects.sourceSets.main.allSource.srcDirs).files.absolutePath
 }
@@ -307,7 +307,7 @@ task jacocoRootReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
 	// the subprojects is wrong (e.g. a project is missing
 	// in there).
 	setOnlyIf { true }
-}
+} */
 
 task integrationTest {
 	// Depend on the integration test's 'run' task using a closure, as
diff --git a/settings.gradle b/settings.gradle
index ca59a4d..d363399 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -10,6 +10,6 @@ include 'minidns-iterative-resolver'
 include 'minidns-dnssec'
 include 'minidns-dane-java7'
 include 'minidns-integration-test'
-include 'minidns-repl'
+// include 'minidns-repl'
 include 'minidns-hla'
-include 'minidns-android21'
+// include 'minidns-android21'
