126 lines
3.3 KiB
Groovy
126 lines
3.3 KiB
Groovy
apply plugin: 'java'
|
|
apply plugin: 'eclipse'
|
|
|
|
java.toolchain.languageVersion = JavaLanguageVersion.of(25)
|
|
|
|
tasks.withType(JavaCompile) {
|
|
options.encoding = 'UTF-8'
|
|
}
|
|
|
|
|
|
eclipse {
|
|
classpath {
|
|
downloadJavadoc = true
|
|
downloadSources = true
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
math
|
|
events
|
|
assets
|
|
graphics
|
|
gui
|
|
main
|
|
}
|
|
|
|
|
|
configurations {
|
|
commonImplementation
|
|
assetsImplementation.extendsFrom(eventsImplementation)
|
|
graphicsImplementation.extendsFrom(mathImplementation, assetsImplementation)
|
|
guiImplementation.extendsFrom(graphicsImplementation)
|
|
implementation.extendsFrom(guiImplementation)
|
|
}
|
|
|
|
|
|
sourceSets.all { sourceSet ->
|
|
String implementationConfigName = sourceSet.implementationConfigurationName
|
|
|
|
configurations.named(implementationConfigName).configure {
|
|
extendsFrom(configurations.named("commonImplementation").get())
|
|
}
|
|
}
|
|
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven {
|
|
name = "Speiger Maven"
|
|
url = "https://maven.speiger.com/repository/main"
|
|
}
|
|
maven { url "https://central.sonatype.com/repository/maven-snapshots" }
|
|
}
|
|
|
|
|
|
dependencies {
|
|
assetsImplementation sourceSets.events.output
|
|
graphicsImplementation sourceSets.math.output
|
|
graphicsImplementation sourceSets.assets.output
|
|
guiImplementation sourceSets.graphics.output
|
|
implementation sourceSets.gui.output
|
|
|
|
//LWJGL 3
|
|
commonImplementation platform("org.lwjgl:lwjgl-bom:$lwjglVersion")
|
|
|
|
commonImplementation "org.lwjgl:lwjgl"
|
|
commonImplementation "org.lwjgl:lwjgl-glfw"
|
|
commonImplementation "org.lwjgl:lwjgl-jemalloc"
|
|
commonImplementation "org.lwjgl:lwjgl-openal"
|
|
commonImplementation "org.lwjgl:lwjgl-opengl"
|
|
commonImplementation "org.lwjgl:lwjgl-stb"
|
|
commonImplementation "org.lwjgl:lwjgl-nfd"
|
|
commonImplementation "org.lwjgl:lwjgl-freetype"
|
|
commonImplementation "org.lwjgl:lwjgl-harfbuzz"
|
|
commonImplementation "org.lwjgl:lwjgl-nanovg"
|
|
commonImplementation "org.lwjgl:lwjgl::$lwjglNatives"
|
|
commonImplementation "org.lwjgl:lwjgl-glfw::$lwjglNatives"
|
|
commonImplementation "org.lwjgl:lwjgl-jemalloc::$lwjglNatives"
|
|
commonImplementation "org.lwjgl:lwjgl-openal::$lwjglNatives"
|
|
commonImplementation "org.lwjgl:lwjgl-opengl::$lwjglNatives"
|
|
commonImplementation "org.lwjgl:lwjgl-stb::$lwjglNatives"
|
|
commonImplementation "org.lwjgl:lwjgl-nfd::$lwjglNatives"
|
|
commonImplementation "org.lwjgl:lwjgl-freetype::$lwjglNatives"
|
|
commonImplementation "org.lwjgl:lwjgl-harfbuzz::$lwjglNatives"
|
|
commonImplementation "org.lwjgl:lwjgl-nanovg::$lwjglNatives"
|
|
commonImplementation "org.jspecify:jspecify:1.0.0"
|
|
|
|
//Gson
|
|
commonImplementation 'com.google.code.gson:gson:2.8.6'
|
|
|
|
//Primitive Collections
|
|
commonImplementation 'de.speiger:Primitive-Collections:1.0.0'
|
|
}
|
|
|
|
jar {
|
|
manifest {
|
|
attributes "Main-Class": 'speiger.src.coreengine.NewRenderEngineTest'
|
|
}
|
|
sourceSets.each { ss ->
|
|
from ss.output
|
|
}
|
|
from {
|
|
configurations.runtimeClasspath.collect {
|
|
it.isDirectory() ? it : zipTree(it)
|
|
}
|
|
}
|
|
duplicatesStrategy = DuplicatesStrategy.INCLUDE
|
|
}
|
|
|
|
task srcJar(type: Jar) {
|
|
archiveClassifier = 'sources'
|
|
|
|
sourceSets.each { ss ->
|
|
from ss.allSource
|
|
}
|
|
from {
|
|
configurations.runtimeClasspath.collect {
|
|
it.isDirectory() ? it : zipTree(it)
|
|
}
|
|
}
|
|
duplicatesStrategy = DuplicatesStrategy.INCLUDE
|
|
}
|
|
|
|
artifacts {
|
|
archives srcJar
|
|
} |