Skip to content

Commit

Permalink
i love modules i love modules i love modules
Browse files Browse the repository at this point in the history
statements dreamt up by the utterly deranged
  • Loading branch information
ramidzkh committed Nov 20, 2023
1 parent e440bff commit 418a2ba
Show file tree
Hide file tree
Showing 11 changed files with 295 additions and 291 deletions.
92 changes: 92 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
plugins {
id("java-library")
id("maven-publish")
id("signing")
id("com.github.johnrengelman.shadow") version "7.1.0"
}

group = "io.github.astrarre"
version = "1.0.0-SNAPSHOT"

repositories {
mavenCentral()

maven {
name = "FabricMC"
url = uri("https://maven.fabricmc.net/")
}
}

dependencies {
implementation("net.fabricmc:mapping-io:0.3.0")
implementation(files(RepackagedJavacProvider.createJavacJar(buildDir)))

testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.1")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}

java {
sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16

withSourcesJar()
// withJavadocJar()
}

tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.release.set(17)
}

tasks.withType(Test) {
useJUnitPlatform()
}

tasks.withType(Javadoc) {
(options as StandardJavadocDocletOptions).addBooleanOption("html5", true)
}

shadowJar {
relocate("com.sun", "io.github.astrarre.sfu.shadow.com.sun")
}

publishing {
publications {
mavenJava(MavenPublication) {
artifact(tasks.shadowJar) {
classifier = null
}

artifact(tasks.sourcesJar)

if (signing.signatory != null) {
signing.sign(this)
}

pom {
name.set("Source Fixer Upper")
packaging = "jar"

description.set("A fast remapper for Java source code")
url.set("https://github.com/Astrarre/Source-Fixer-Upper")

licenses {
license {
name.set("MIT License")
url.set("https://spdx.org/licenses/MIT")
}
}
}
}
}

repositories {
maven {
def releasesRepoUrl = uri("${buildDir}/repos/releases")
def snapshotsRepoUrl = uri("${buildDir}/repos/snapshots")
name = "Project"
url = version.toString().endsWith("SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl
}
}
}
130 changes: 0 additions & 130 deletions build.gradle.kts

This file was deleted.

4 changes: 3 additions & 1 deletion buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ repositories {
}

dependencies {
implementation("org.ow2.asm:asm-commons:9.2")
implementation("org.ow2.asm:asm-commons:9.5")
implementation("org.ow2.asm:asm-tree:9.6")
implementation("org.ow2.asm:asm-analysis:9.6")
}
Loading

0 comments on commit 418a2ba

Please sign in to comment.