123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- plugins {
- id 'com.github.johnrengelman.shadow' version '6.1.0'
- id 'maven-publish'
- }
- dependencies {
- shadow("org.spongepowered:configurate-hocon:${rootProject.configurate_version}")
- testImplementation("org.junit.jupiter:junit-jupiter:${rootProject.junit_version}")
- testImplementation("org.assertj:assertj-core:${rootProject.assertj_version}")
- testImplementation("org.mockito:mockito-inline:${rootProject.mockito_version}")
- testImplementation("org.mockito:mockito-junit-jupiter:${rootProject.mockito_version}")
- testImplementation("com.google.jimfs:jimfs:${rootProject.jimfs_version}") {
- exclude group: 'com.google.guava', module: 'guava'
- }
- }
- java {
- // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
- // if it is present.
- withSourcesJar()
- }
- jar {
- from "LICENSE"
- }
- shadowJar {
- configurations = [project.configurations.shadow]
- archiveClassifier = "shadow"
- }
- remapJar {
- dependsOn(shadowJar)
- input.set(shadowJar.archiveFile)
- }
- test.enabled = false
- task testClient(type: Test) {
- systemProperty "fabric.dli.env", "client"
- }
- test.dependsOn testClient
- task testServer(type: Test) {
- systemProperty "fabric.dli.env", "server"
- }
- test.dependsOn testServer
- tasks.withType(Test) {
- group = "verification"
- useJUnitPlatform()
- }
- javadoc {
- options {
- title = "$modName ${project.version} API"
- source = "16"
- encoding = "UTF-8"
- charSet = "UTF-8"
- memberLevel = JavadocMemberLevel.PROTECTED
- links = [
- "https://docs.oracle.com/en/java/javase/16/docs/api/"
- ]
- // Disable the crazy super-strict doclint tool in Java 8
- addStringOption("Xdoclint:none", "-quiet")
- }
- failOnError false
- }
- task javadocJar(type: Jar) {
- dependsOn javadoc
- from javadoc.destinationDir
- archiveClassifier = "javadoc"
- }
- build.dependsOn javadocJar
- // configure the maven publication
- publishing {
- publications {
- mavenJava(MavenPublication) {
- artifactId rootProject.name
- artifact(remapJar) {
- builtBy remapJar
- }
- artifact(sourcesJar) {
- builtBy remapSourcesJar
- }
- artifact javadocJar
- }
- }
- }
|