Files
celeritas/common/build.gradle

109 lines
2.7 KiB
Groovy

plugins {
id 'java-library'
id 'maven-publish'
id 'xyz.wagyourtail.jvmdowngrader' version '1.3.3'
}
group = "org.embeddedt.celeritas"
version = rootProject.version
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
withSourcesJar()
}
repositories {
maven {
name = "mojang"
url = "https://libraries.minecraft.net/"
mavenContent {
includeGroup "org.lwjgl.lwjgl"
}
}
mavenCentral()
}
dependencies {
def lwjglVersion = "2.9.4-nightly-20150209"
def lwjglNatives = "natives-linux"
// implementation(platform("org.lwjgl:lwjgl-bom:$lwjglVersion"))
implementation "org.lwjgl.lwjgl:lwjgl:$lwjglVersion"
implementation "org.lwjgl.lwjgl:lwjgl_util:$lwjglVersion"
// runtimeOnly(group: "org.lwjgl", name: "lwjgl", classifier: lwjglNatives)
// runtimeOnly(group: "org.lwjgl", name: "lwjgl-opengl", classifier: lwjglNatives)
implementation "org.joml:joml:1.10.5"
implementation "it.unimi.dsi:fastutil:7.1.0"
implementation "org.apache.logging.log4j:log4j-api:2.0-beta9"
compileOnly "org.jetbrains:annotations:24.1.0"
compileOnly("org.projectlombok:lombok:1.18.30")
annotationProcessor("org.projectlombok:lombok:1.18.30")
implementation("org.ow2.asm:asm-debug-all:5.0.3")
implementation "com.google.code.gson:gson:2.2.4"
testImplementation 'org.junit.jupiter:junit-jupiter:5.13.0'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
tasks.named('test', Test) {
useJUnitPlatform()
maxHeapSize = '1G'
testLogging {
events "passed"
}
}
tasks {
jar {
archiveClassifier = "predg"
}
downgradeJar {
archiveClassifier = ""
}
}
for (outgoingConfig in ["runtimeElements", "apiElements"]) {
var outgoing = configurations.getByName(outgoingConfig)
outgoing.outgoing.artifacts.clear()
outgoing.outgoing.artifact(tasks.downgradeJar)
afterEvaluate {
var javaVersionAttr = Attribute.of("org.gradle.jvm.version", Integer)
outgoing.attributes {
attribute(javaVersionAttr, 8)
}
}
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId 'celeritas-common'
from components.java
}
}
repositories {
maven {
name = "mavenpattern"
url = uri("https://mvn.falsepattern.com/releases")
credentials(org.gradle.api.credentials.PasswordCredentials)
}
}
}
tasks.withType(Jar).configureEach {
// from(rootProject.file("COPYING"))
// from(rootProject.file("COPYING.LESSER"))
}
/*
jar {
manifest {
attributes([
"Lwjgl3ify-Aware": "true"
])
}
}
*/