💚 Remove some warnings, create source set separately
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 8 Nov 2024 19:48:52 +0000 (20:48 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 8 Nov 2024 19:53:19 +0000 (20:53 +0100)
build.gradle

index 73f1df8..a9dfb0d 100644 (file)
@@ -36,6 +36,10 @@ idea {
 group = "net.pterodactylus"
 version = "0.1"
 
+sourceSets {
+    generated
+}
+
 repositories {
     mavenCentral()
 }
@@ -60,7 +64,7 @@ dependencies {
     testImplementation group: "com.spotify", name: "hamcrest-jackson", version: "1.3.2"
 }
 
-task fatJar(type: Jar) {
+tasks.register('fatJar', Jar) {
     archiveBaseName.set(project.name + "-all")
     manifest {
         attributes(
@@ -79,14 +83,7 @@ tasks.named('test') {
     jvmArgs += "--add-opens=java.base/java.util=ALL-UNNAMED"
 }
 
-task createVersion() {
-    sourceSets {
-        generated {
-            resources {
-                srcDir "src/generated/resources"
-            }
-        }
-    }
+tasks.register('createVersion') {
     processResources.dependsOn(createVersion)
 }