mirror of
https://github.com/TauMC/glsl-transformation-lib.git
synced 2026-11-29 22:02:09 -05:00
100 lines
2.4 KiB
Groovy
100 lines
2.4 KiB
Groovy
plugins {
|
|
id 'antlr'
|
|
id 'java-library'
|
|
id 'maven-publish'
|
|
id "com.cinnober.gradle.semver-git" version "3.0.0" apply false
|
|
id 'com.gradleup.shadow' version '8.3.0'
|
|
}
|
|
|
|
group = 'org.taumc'
|
|
ext.snapshotSuffix = '<count>.g<sha>'
|
|
apply plugin: 'com.cinnober.gradle.semver-git'
|
|
|
|
repositories {
|
|
maven {
|
|
name = "gtnh"
|
|
url = uri("https://nexus.gtnewhorizons.com/repository/public/")
|
|
content {
|
|
includeGroup 'com.github.bsideup.jabel'
|
|
}
|
|
}
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
annotationProcessor 'com.github.bsideup.jabel:jabel-javac-plugin:1.0.1'
|
|
compileOnly 'com.github.bsideup.jabel:jabel-javac-plugin:1.0.1'
|
|
|
|
def antlrVersion = "4.13.2"
|
|
|
|
shadow("org.antlr:antlr4-runtime:${antlrVersion}") {
|
|
transitive = false
|
|
}
|
|
antlr "org.antlr:antlr4:${antlrVersion}"
|
|
|
|
def jcppVersion = "1.4.14"
|
|
implementation "org.anarres:jcpp:${jcppVersion}"
|
|
shadow("org.anarres:jcpp:${jcppVersion}") {
|
|
transitive = false
|
|
}
|
|
|
|
testImplementation platform('org.junit:junit-bom:5.10.0')
|
|
testImplementation 'org.junit.jupiter:junit-jupiter'
|
|
}
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(8)
|
|
vendor = JvmVendorSpec.AZUL
|
|
}
|
|
}
|
|
|
|
configure([tasks.compileJava]) {
|
|
sourceCompatibility = 17
|
|
options.release = 8
|
|
|
|
javaCompiler = javaToolchains.compilerFor {
|
|
languageVersion = JavaLanguageVersion.of(17)
|
|
vendor = JvmVendorSpec.AZUL
|
|
}
|
|
}
|
|
|
|
generateGrammarSource {
|
|
arguments += ["-visitor", '-package', 'org.taumc.glsl.grammar']
|
|
outputDirectory = new File(buildDir.toString() + "/generated-src/antlr/main/org/taumc/glsl/grammar/")
|
|
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
tasks.named('shadowJar', com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
|
|
configurations = [project.configurations.shadow]
|
|
|
|
archiveClassifier = 'fat'
|
|
|
|
enableRelocation = true
|
|
relocationPrefix = "org.taumc.glsl.shadowed"
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
from components.java
|
|
}
|
|
}
|
|
repositories {
|
|
maven {
|
|
name = "taumcRepository"
|
|
url = uri("https://maven.taumc.org/releases")
|
|
credentials {
|
|
username = System.getenv("MAVEN_USERNAME")
|
|
password = System.getenv("MAVEN_SECRET")
|
|
}
|
|
authentication {
|
|
basic(BasicAuthentication)
|
|
}
|
|
}
|
|
}
|
|
} |