From bfcdd8d6471b66846b3b591dc00c366d1883a7a9 Mon Sep 17 00:00:00 2001
From: pvranik <petr.vranik@mgm-tp.com>
Date: Sun, 29 Oct 2023 18:06:54 +0100
Subject: [PATCH] publish fatjar

---
 build.gradle | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/build.gradle b/build.gradle
index ef4f136..2cb9895 100644
--- a/build.gradle
+++ b/build.gradle
@@ -38,14 +38,9 @@ compileJava {
 	options.compilerArgs += ["-Aproject=${project.group}/${project.name}"]
 }
 
-tasks.register('javadocJar', Jar) {
-	archiveClassifier = 'javadoc'
-	from javadoc
-}
-
-tasks.register('sourcesJar', Jar) {
-	archiveClassifier = 'sources'
-	from sourceSets.main.allSource
+java {
+	withSourcesJar()
+	withJavadocJar()
 }
 
 tasks.register('fatJar', Jar) {
@@ -63,7 +58,7 @@ tasks.register('fatJar', Jar) {
 
 
 artifacts {
-	archives javadocJar, sourcesJar, fatJar
+	archives fatJar
 }
 
 publishing {
@@ -92,6 +87,7 @@ publishing {
 	publications {
 		mavenJava(MavenPublication) {
 			from(components.java)
+			artifact fatJar
 			pom {
 				name = 'netatmo4j'
 				// optionally artifactId can be defined here