mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-12 11:10:29 +00:00
Minor tweaks to build script
Mostly just rearranging. Bump JUnit version in an attempt to fix test outputs, but it appears this is a mix of gradle/gradle#5975 and gradle/gradle#4438.
This commit is contained in:
parent
29dce26bf6
commit
f68ab3edd1
49
build.gradle
49
build.gradle
@ -78,12 +78,14 @@ dependencies {
|
|||||||
|
|
||||||
shade 'org.squiddev:Cobalt:0.5.0-SNAPSHOT'
|
shade 'org.squiddev:Cobalt:0.5.0-SNAPSHOT'
|
||||||
|
|
||||||
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.1.0'
|
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.4.2'
|
||||||
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.1.0'
|
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.4.2'
|
||||||
|
|
||||||
deployerJars "org.apache.maven.wagon:wagon-ssh:3.0.0"
|
deployerJars "org.apache.maven.wagon:wagon-ssh:3.0.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Compile tasks
|
||||||
|
|
||||||
javadoc {
|
javadoc {
|
||||||
include "dan200/computercraft/api/**/*.java"
|
include "dan200/computercraft/api/**/*.java"
|
||||||
}
|
}
|
||||||
@ -102,6 +104,14 @@ jar {
|
|||||||
from configurations.shade.collect { it.isDirectory() ? it : zipTree(it) }
|
from configurations.shade.collect { it.isDirectory() ? it : zipTree(it) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[compileJava, compileTestJava].forEach {
|
||||||
|
it.configure {
|
||||||
|
options.compilerArgs << "-Xlint" << "-Xlint:-processing" << "-Werror"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import java.nio.charset.StandardCharsets
|
import java.nio.charset.StandardCharsets
|
||||||
import java.nio.file.*
|
import java.nio.file.*
|
||||||
import java.util.zip.*
|
import java.util.zip.*
|
||||||
@ -233,7 +243,14 @@ task compressJson(dependsOn: extractAnnotationsJar) {
|
|||||||
|
|
||||||
assemble.dependsOn compressJson
|
assemble.dependsOn compressJson
|
||||||
|
|
||||||
/* Check tasks */
|
// Check tasks
|
||||||
|
|
||||||
|
test {
|
||||||
|
useJUnitPlatform()
|
||||||
|
testLogging {
|
||||||
|
events "skipped", "failed"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
license {
|
license {
|
||||||
mapping("java", "SLASHSTAR_STYLE")
|
mapping("java", "SLASHSTAR_STYLE")
|
||||||
@ -257,6 +274,13 @@ license {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gradle.projectsEvaluated {
|
||||||
|
tasks.withType(LicenseFormat) {
|
||||||
|
outputs.upToDateWhen { false }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
task licenseAPI(type: LicenseCheck);
|
task licenseAPI(type: LicenseCheck);
|
||||||
task licenseFormatAPI(type: LicenseFormat);
|
task licenseFormatAPI(type: LicenseFormat);
|
||||||
[licenseAPI, licenseFormatAPI].forEach {
|
[licenseAPI, licenseFormatAPI].forEach {
|
||||||
@ -267,7 +291,7 @@ task licenseFormatAPI(type: LicenseFormat);
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Upload tasks */
|
// Upload tasks
|
||||||
|
|
||||||
task checkRelease {
|
task checkRelease {
|
||||||
group "upload"
|
group "upload"
|
||||||
@ -399,22 +423,5 @@ task uploadAll(dependsOn: uploadTasks) {
|
|||||||
description "Uploads to all repositories (Maven, Curse, GitHub release)"
|
description "Uploads to all repositories (Maven, Curse, GitHub release)"
|
||||||
}
|
}
|
||||||
|
|
||||||
test {
|
|
||||||
useJUnitPlatform()
|
|
||||||
testLogging {
|
|
||||||
events "passed", "skipped", "failed"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gradle.projectsEvaluated {
|
|
||||||
tasks.withType(JavaCompile) {
|
|
||||||
options.compilerArgs << "-Xlint" << "-Xlint:-processing" << "-Werror"
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.withType(LicenseFormat) {
|
|
||||||
outputs.upToDateWhen { false }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
runClient.outputs.upToDateWhen { false }
|
runClient.outputs.upToDateWhen { false }
|
||||||
runServer.outputs.upToDateWhen { false }
|
runServer.outputs.upToDateWhen { false }
|
||||||
|
Loading…
Reference in New Issue
Block a user