diff options
author | SciWhiz12 <arnoldnunag12@gmail.com> | 2021-05-15 12:24:25 +0800 |
---|---|---|
committer | SciWhiz12 <arnoldnunag12@gmail.com> | 2021-05-15 12:24:25 +0800 |
commit | a4fe3e095ffdffb6022327def06744948d061571 (patch) | |
tree | fe2df7d87ceb4abf89a56d668d211d4b4315365a /build.gradle | |
parent | e4905257d00e72c8b72a575a263633d1cf4a5b77 (diff) | |
download | Artifactural-a4fe3e095ffdffb6022327def06744948d061571.tar.gz Artifactural-a4fe3e095ffdffb6022327def06744948d061571.tar.bz2 Artifactural-a4fe3e095ffdffb6022327def06744948d061571.zip |
Cleanup buildscript, update plugins
Licenser plugin changed from 'net.minecrell' to 'org.cadixdev'.
Changed from using publications DSL to explicit creation call, fixes
issues with IDE not recognizing the DSL correctly.
Diffstat (limited to 'build.gradle')
-rw-r--r-- | build.gradle | 71 |
1 files changed, 34 insertions, 37 deletions
diff --git a/build.gradle b/build.gradle index 9fff891..ec0d95f 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java-library' id 'maven-publish' id 'eclipse' - id 'net.minecrell.licenser' version '0.3' + id 'org.cadixdev.licenser' version '0.6.0' id 'org.ajoberstar.grgit' version '4.1.0' } @@ -29,8 +29,8 @@ configurations { sharedImplementation.extendsFrom apiImplementation gradlecompImplementation.extendsFrom sharedImplementation - compile.extendsFrom sharedImplementation - compile.extendsFrom gradlecompImplementation + implementation.extendsFrom sharedImplementation + implementation.extendsFrom gradlecompImplementation } dependencies { @@ -41,9 +41,9 @@ dependencies { gradlecompImplementation 'com.google.guava:guava:30.1-jre' gradlecompImplementation 'net.minecraftforge:unsafe:0.2.0' - compile sourceSets.api.output - compile sourceSets.shared.output - compile sourceSets.gradlecomp.output + implementation sourceSets.api.output + implementation sourceSets.shared.output + implementation sourceSets.gradlecomp.output } @@ -51,57 +51,54 @@ tasks.withType(JavaCompile) { options.encoding = 'utf-8' options.deprecation = true } + java { toolchain.languageVersion = JavaLanguageVersion.of(8) + withSourcesJar() } jar { from sourceSets.api.output from sourceSets.shared.output - from(sourceSets.gradlecomp.output) + from sourceSets.gradlecomp.output } -task sourcesJar(type: Jar, dependsOn: classes) { - classifier = 'sources' +sourcesJar { from sourceSets.api.allSource from sourceSets.shared.allSource from sourceSets.gradlecomp.allSource } - license { header = file("$rootDir/LICENSE-header.txt") } publishing { - publications { - mavenJava(MavenPublication) { - from components.java - artifact tasks.sourcesJar - pom { - groupId = project.group - version = project.version - artifactId = project.archivesBaseName - name = project.archivesBaseName - packaging = 'jar' - description = 'A Gradle artifact processing and management tool' + publications.create("mavenJava", MavenPublication) { + from components.java + pom { + groupId = project.group + version = project.version + artifactId = project.archivesBaseName + name = project.archivesBaseName + packaging = 'jar' + description = 'A Gradle artifact processing and management tool' + url = 'https://github.com/MinecraftForge/Artifactural/' + + scm { url = 'https://github.com/MinecraftForge/Artifactural/' - - scm { - url = 'https://github.com/MinecraftForge/Artifactural/' - connection = 'scm:git:git://github.com/MinecraftForge/Artifactural.git' - developerConnection = 'scm:git:git@github.com:MinecraftForge/Artifactural.git' - } - issueManagement { - system = 'github' - url = 'https://github.com/MinecraftForge/Artifactural/issues' - } - licenses { - license { - name = 'LGPL-2.1' - url = 'https://www.gnu.org/licenses/lgpl-2.1.txt' - distribution = 'repo' - } + connection = 'scm:git:git://github.com/MinecraftForge/Artifactural.git' + developerConnection = 'scm:git:git@github.com:MinecraftForge/Artifactural.git' + } + issueManagement { + system = 'github' + url = 'https://github.com/MinecraftForge/Artifactural/issues' + } + licenses { + license { + name = 'LGPL-2.1' + url = 'https://www.gnu.org/licenses/lgpl-2.1.txt' + distribution = 'repo' } } } |