/* * This file was generated by the Gradle 'init' task. * * This generated file contains a sample Java Library project to get you started. * For more details take a look at the Java Libraries chapter in the Gradle * User Manual available at https://docs.gradle.org/6.3/userguide/java_library_plugin.html */ plugins { id 'application' id "com.github.johnrengelman.shadow" version "7.1.2" id "com.diffplug.spotless" version "6.5.1" } sourceCompatibility = 1.11 targetCompatibility = 1.11 // Set compiler to use UTF-8 compileJava.options.encoding = 'UTF-8' compileTestJava.options.encoding = 'UTF-8' javadoc.options.encoding = 'UTF-8' tasks.withType(JavaCompile) { options.encoding = 'UTF-8' // if (JavaVersion.current().isJava9Compatible()) { // options.release = 8 // } } tasks.withType(Test) { systemProperty('file.encoding', 'UTF-8') } tasks.withType(Javadoc) { options.encoding = 'UTF-8' } allprojects { repositories { // Use jcenter for resolving dependencies. // You can declare any Maven/Ivy/file repository here. mavenCentral() } } dependencies { implementation project(":solarxr-protocol") // This dependency is used internally, and not exposed to consumers on their own compile classpath. implementation group: 'com.google.flatbuffers', name: 'flatbuffers-java', version: '2.0.3' implementation group: 'commons-cli', name: 'commons-cli', version: '1.3.1' implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.12.6.1' implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: '2.13.3' implementation 'com.github.jonpeterson:jackson-module-model-versioning:1.2.2' implementation 'org.apache.commons:commons-math3:3.6.1' implementation 'org.apache.commons:commons-lang3:3.12.0' implementation 'net.java.dev.jna:jna:5.10.0' implementation 'net.java.dev.jna:jna-platform:5.10.0' implementation 'com.illposed.osc:javaosc-core:0.8' implementation 'com.fazecast:jSerialComm:2.9.0' implementation 'com.google.protobuf:protobuf-java:3.19.4' implementation "org.java-websocket:Java-WebSocket:1.5.2" implementation 'com.melloware:jintellitype:1.4.0' // Use JUnit test framework testImplementation platform('org.junit:junit-bom:5.8.2') testImplementation 'org.junit.jupiter:junit-jupiter' testImplementation 'org.junit.platform:junit-platform-launcher' } test { useJUnitPlatform() } shadowJar { archiveBaseName.set('slimevr') archiveClassifier.set('') archiveVersion.set('') } application { getMainClass().set('dev.slimevr.Main') } spotless { // optional: limit format enforcement to just the files changed by this feature branch // ratchetFrom 'origin/main' format 'misc', { // define the files to apply `misc` to target '*.gradle', '*.md', '.gitignore' // define the steps to apply to those files trimTrailingWhitespace() endWithNewline() indentWithTabs() } // format 'yaml', { // target '*.yml', '*.yaml', // trimTrailingWhitespace() // endWithNewline() // indentWithSpaces(2) // YAML cannot contain tabs: https://yaml.org/faq.html // } java { removeUnusedImports() // Use eclipse JDT formatter eclipse().configFile("spotless.xml") } }