From: Sunil Mohan Adapa <sunil@medhas.org>
Date: Sat, 1 May 2021 12:31:16 -0700
Subject: Alter gradle build file to suite Debian

The following build system functionality is disabled because it is not needed in
Debian and simplifies packaging effort by not needed dependencies.

Error Prone and Animal Sniffer tools help upstream in avoiding errors and
ensuring compatibility with multiple version of Java.

JMH is used for benchmarking.

Coveralls and Jacoco are needed for code coverage analysis and reporting that
upstream developers can use to increase number of tests.

Eclipse and Idea plugins are needed for generating project files that can be
opened in respective IDEs.

Disable tests until all the dependencies are packaged and they can be run
reliably.

Disable sub-projects that have additional dependencies and focus on parts that
are needed for Smack and Jitsi.

Forwarded: not-needed
---
 build.gradle    | 58 ++++++++++++++++++++++++++++-----------------------------
 settings.gradle | 10 +++++-----
 2 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/build.gradle b/build.gradle
index 194c9df..0010922 100644
--- a/build.gradle
+++ b/build.gradle
@@ -6,22 +6,22 @@ buildscript {
 		mavenCentral()
 	}
 
-	dependencies {
-		classpath "org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.2"
-	}
+	// dependencies {
+	// 	classpath "org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.2"
+	// }
 }
 
 plugins {
-	id 'ru.vyarus.animalsniffer' version '1.5.0'
-	id 'net.ltgt.errorprone' version '0.8.1'
-	id 'me.champeau.gradle.jmh' version '0.4.8'
+	// id 'ru.vyarus.animalsniffer' version '1.5.0'
+	// id 'net.ltgt.errorprone' version '0.8.1'
+	// id 'me.champeau.gradle.jmh' version '0.4.8'
 }
 
 allprojects {
 	apply plugin: 'java'
-	apply plugin: 'eclipse'
-	apply plugin: 'idea'
-	apply plugin: 'jacoco'
+	// apply plugin: 'eclipse'
+	// apply plugin: 'idea'
+	// apply plugin: 'jacoco'
 
 	repositories {
 		mavenLocal()
@@ -45,14 +45,14 @@ allprojects {
 		sonatypeStagingUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
 		builtDate = (new java.text.SimpleDateFormat("yyyy-MM-dd")).format(new Date())
 		oneLineDesc = 'An Open Source XMPP (Jabber) library'
-		androidProjects = [':jxmpp-core', ':jxmpp-jid', ':jxmpp-stringprep-libidn', ':jxmpp-util-cache'].collect{ project(it) }
+		androidProjects = [':jxmpp-core', ':jxmpp-jid', ':jxmpp-util-cache'].collect{ project(it) }
 		jmhProjects = [':jxmpp-util-cache'].collect { project(it) }
 		junit4Projects = [
 			':jxmpp-core',
 			':jxmpp-jid',
-			':jxmpp-repl',
+			// ':jxmpp-repl',
 			':jxmpp-stringprep-icu4j',
-			':jxmpp-stringprep-libidn',
+			// ':jxmpp-stringprep-libidn',
 			':jxmpp-util-cache',
 		].collect { project(it) }
 		// Only enable Error Prone for non JMH projects, as JMH
@@ -79,11 +79,11 @@ allprojects {
 				  )
 	}
 
-	eclipse {
+	/* eclipse {
 		classpath {
 			downloadJavadoc = true
 		}
-	}
+	} */
 
 	// Make all project's 'test' target depend on javadoc, so that
 	// javadoc is also linted.
@@ -100,7 +100,6 @@
 			// warning if source/target is set to 1.7 and
 			// bootclasspath is *not* set.
 			'-Xlint:-options',
-			'-Werror',
 		]
 	}
 	if (JavaVersion.current().isJava8Compatible()) {
@@ -132,7 +131,7 @@
 		options.charSet = "UTF-8"
 	}
 
-	jacoco {
+	/* jacoco {
 		toolVersion = "0.8.3"
 	}
 
@@ -158,7 +158,7 @@ allprojects {
 			events "failed"
 			exceptionFormat "full"
 		}
-	}
+	} */
 }
 
 task javadocAll(type: Javadoc) {
@@ -195,12 +195,12 @@ uploadArchives.enabled = false
 evaluationDependsOnChildren()
 subprojects {
 	apply plugin: 'maven-publish'
-	apply plugin: 'signing'
-	apply plugin: 'checkstyle'
+	// apply plugin: 'signing'
+	// apply plugin: 'checkstyle'
 
-	checkstyle {
-		toolVersion = '8.22'
-	}
+	// checkstyle {
+	// 	toolVersion = '8.22'
+	// }
 	task sourcesJar(type: Jar, dependsOn: classes) {
 		classifier = 'sources'
 		from sourceSets.main.allSource
@@ -218,7 +218,7 @@ subprojects {
 		testRuntime testsJar
 	}
 
-	publishing {
+	/* publishing {
 		publications {
 			mavenJava(MavenPublication) {
 				from components.java
@@ -272,7 +272,7 @@ subprojects {
 				}
 			}
 		}
-	}
+	} */
 	rootProject.distributionZip {
 		dependsOn build
 		from(buildDir) {
@@ -283,7 +283,7 @@ subprojects {
 	// Workaround for gpg signatory not supporting the 'required' option
 	// See https://github.com/gradle/gradle/issues/5064#issuecomment-381924984
 	// Note what we use 'signing.gnupg.keyName' instead of 'signing.keyId'.
-	tasks.withType(Sign) {
+	/* tasks.withType(Sign) {
 		onlyIf {
 			project.hasProperty('signing.gnupg.keyName')
 		}
@@ -292,10 +292,10 @@ subprojects {
 		required { signingRequired }
 		useGpgCmd()
 		sign publishing.publications.mavenJava
-	}
+	} */
 }
 
-configure (errorProneProjects) {
+/* configure (errorProneProjects) {
 	apply plugin: 'net.ltgt.errorprone'
 
 	tasks.withType(JavaCompile) {
@@ -319,7 +319,7 @@ configure (errorProneProjects) {
 		errorprone 'com.google.errorprone:error_prone_core:2.3.3'
 		errorproneJavac('com.google.errorprone:javac:9+181-r4173-1')
 	}
-}
+} */
 
 dependencies {
 	androidProjects.each { project ->
@@ -327,7 +327,7 @@ dependencies {
 	}
 }
 
-configure (junit4Projects) {
+/* configure (junit4Projects) {
 	dependencies {
 		testImplementation "junit:junit:4.12"
 		testRuntimeOnly "org.junit.vintage:junit-vintage-engine:$junitVersion"
@@ -381,7 +381,7 @@ task jacocoRootReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
 	// the subprojects is wrong (e.g. a project is missing
 	// in there).
 	setOnlyIf { true }
-}
+} */
 
 def getGitCommit() {
 	def projectDirFile = new File("$projectDir")
diff --git a/settings.gradle b/settings.gradle
index ff18801..b1c8476 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,8 +1,8 @@
 include 'jxmpp-core',
 		'jxmpp-jid',
-		'jxmpp-strings-testframework',
+		// 'jxmpp-strings-testframework',
 		'jxmpp-stringprep-icu4j',
-		'jxmpp-stringprep-libidn',
-		'jxmpp-stringprep-rocksxmppprecis',
-		'jxmpp-util-cache',
-		'jxmpp-repl'
+		// 'jxmpp-stringprep-libidn',
+		// 'jxmpp-stringprep-rocksxmppprecis',
+		'jxmpp-util-cache'
+		// 'jxmpp-repl'
