|
| 1 | +plugins { |
| 2 | + id 'java-library' |
| 3 | + id 'idea' |
| 4 | + id 'eclipse' |
| 5 | + id 'maven-publish' |
| 6 | + alias libs.plugins.licenser |
| 7 | + alias libs.plugins.gradleutils |
| 8 | + alias libs.plugins.gitversion |
| 9 | + alias libs.plugins.changelog |
| 10 | +} |
| 11 | + |
| 12 | +gradleutils.displayName = 'OS Utils' |
| 13 | +description = 'Utilities for identifying operating systems, architectures, and their defaults.' |
| 14 | +group = 'net.minecraftforge' |
| 15 | +version = gitversion.tagOffset |
| 16 | + |
| 17 | +println "Version: $version" |
| 18 | + |
| 19 | +java { |
| 20 | + toolchain.languageVersion = JavaLanguageVersion.of(8) |
| 21 | + withSourcesJar() |
| 22 | + //withJavadocJar() |
| 23 | +} |
| 24 | + |
| 25 | +dependencies { |
| 26 | + compileOnly libs.nulls |
| 27 | +} |
| 28 | + |
| 29 | +tasks.named('jar', Jar) { |
| 30 | + manifest { |
| 31 | + attributes('Automatic-Module-Name': 'net.minecraftforge.utils.os') |
| 32 | + |
| 33 | + gradleutils.manifestDefaults(it, 'net/minecraftforge/util/os/') |
| 34 | + } |
| 35 | +} |
| 36 | + |
| 37 | +license { |
| 38 | + header = rootProject.file('LICENSE-header.txt') |
| 39 | + newLine = false |
| 40 | + exclude '**/*.properties' |
| 41 | +} |
| 42 | + |
| 43 | +changelog { |
| 44 | + fromBase() |
| 45 | +} |
| 46 | + |
| 47 | +publishing { |
| 48 | + repositories { |
| 49 | + maven gradleutils.publishingForgeMaven |
| 50 | + } |
| 51 | + |
| 52 | + publications.register('mavenJava', MavenPublication) { |
| 53 | + from components.java |
| 54 | + |
| 55 | + changelog.publish(it) |
| 56 | + gradleutils.promote(it) |
| 57 | + |
| 58 | + pom { pom -> |
| 59 | + name = gradleutils.displayName |
| 60 | + description = project.description |
| 61 | + |
| 62 | + gradleutils.pom.addRemoteDetails(pom) |
| 63 | + |
| 64 | + licenses { |
| 65 | + license gradleutils.pom.licenses.LGPLv2_1 |
| 66 | + } |
| 67 | + |
| 68 | + developers { |
| 69 | + developer gradleutils.pom.developers.LexManos |
| 70 | + developer gradleutils.pom.developers.Jonathing |
| 71 | + } |
| 72 | + } |
| 73 | + } |
| 74 | +} |
0 commit comments