diff --git a/build.gradle b/build.gradle
index 028a098b54108a2a7f8fd4bd18d69bc92d234b36..74409d7c06dc557d3e57ce0b7ef77e89f49831a9 100644
--- a/build.gradle
+++ b/build.gradle
@@ -46,6 +46,11 @@ dependencies {
 	testImplementation(group: 'junit', name: 'junit', version: '4.12')
 }
 
+java {
+	withSourcesJar()
+	withJavadocJar()
+}
+
 jacoco {
 	toolVersion = "0.8.6"
 	reportsDir = file("$buildDir/customJacocoReportDir")
@@ -82,20 +87,6 @@ if (project.hasProperty('ossrhUsername') && project.hasProperty('ossrhPassword')
 		sign configurations.archives
 	}
 
-	task javadocJar(type: Jar) {
-		classifier = 'javadoc'
-		from javadoc
-	}
-
-	task sourcesJar(type: Jar) {
-		classifier = 'sources'
-		from sourceSets.main.allSource
-	}
-
-	artifacts {
-		archives javadocJar, sourcesJar
-	}
-
 	uploadArchives {
 		repositories {
 			mavenDeployer {