Unverified Commit cc5cdb65 authored by MarkG's avatar MarkG Committed by NicolaiO
Browse files

Resolve "Download game-controller through Maven repository"

Closes #1567

See merge request main/Sumatra!1316

sumatra-commit: 68e956ecdb365866d2501ca1404473c235027db7
parent 0c2eef83
......@@ -8,26 +8,8 @@ plugins {
id "de.undercouch.download" version "4.0.4"
}
dependencies {
implementation project(':common')
implementation project(':common-math')
implementation project(':moduli-geometry')
implementation 'com.github.TIGERs-Mannheim:moduli:4.1'
implementation 'com.github.g3force:configurable:3.0'
implementation 'com.github.g3force:instanceables:5.2'
implementation 'org.apache.logging.log4j:log4j-api:2.13.3'
implementation 'commons-lang:commons-lang:2.6'
implementation 'commons-configuration:commons-configuration:1.10'
implementation 'commons-io:commons-io:2.7'
api 'com.google.protobuf:protobuf-java:3.12.2'
implementation 'com.sleepycat:je:18.3.12'
testImplementation 'junit:junit:4.13'
testImplementation 'org.assertj:assertj-core:3.16.1'
configurations {
gc
}
def osClassifier = {
......@@ -46,28 +28,39 @@ def osClassifier = {
def osExt = {
def os = System.getProperty("os.name").toLowerCase()
if (os.contains("windows")) {
return ".exe"
return "exe"
}
return ""
}()
def gameControllerVersion = "v2.3.0"
def gameControllerBinary = "ssl-game-controller_${gameControllerVersion}_${osClassifier}${osExt}".toString()
def gameControllerBinaryLocation = "$buildDir/resources/main/ssl-game-controller"
dependencies {
implementation project(':common')
implementation project(':common-math')
implementation project(':moduli-geometry')
implementation 'com.github.TIGERs-Mannheim:moduli:4.1'
implementation 'com.github.g3force:configurable:3.0'
implementation 'com.github.g3force:instanceables:5.2'
task verifyGameControllerBinary() {
inputs.property("binary.version", gameControllerVersion)
outputs.upToDateWhen { true }
doFirst {
// Delete binary, if GC version has changed
delete(gameControllerBinaryLocation)
}
implementation 'org.apache.logging.log4j:log4j-api:2.13.3'
implementation 'commons-lang:commons-lang:2.6'
implementation 'commons-configuration:commons-configuration:1.10'
implementation 'commons-io:commons-io:2.7'
api 'com.google.protobuf:protobuf-java:3.12.2'
implementation 'com.sleepycat:je:18.3.12'
testImplementation 'junit:junit:4.13'
testImplementation 'org.assertj:assertj-core:3.16.1'
gc "com.github.robocup-ssl:ssl-game-controller:v2.4.0:${osClassifier}@${osExt}"
}
task downloadGameController(type: Download) {
src "https://github.com/RoboCup-SSL/ssl-game-controller/releases/download/${gameControllerVersion}/${gameControllerBinary}"
dest file(gameControllerBinaryLocation)
overwrite false
dependsOn(verifyGameControllerBinary)
task copyGameControllerBinary(type: Copy) {
from configurations.gc.singleFile
into "${buildDir}/resources/main"
rename { "ssl-game-controller" }
}
processResources.finalizedBy(downloadGameController)
processResources.finalizedBy(copyGameControllerBinary)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment