Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable configuration cache and redirect :Data:runNetwork output #22

Merged
merged 8 commits into from
Dec 3, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions Data/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ idea {
}

tasks.register("runNetwork", JavaExec.class) {
def inputDir = "../temp/feed15/LULDLRRiverTramCable"
def outputDir = "output"
File inputDir = file("../temp/feed15/LULDLRRiverTramCable")
File outputDir = file("output")
inputs.dir(inputDir).withPathSensitivity(PathSensitivity.RELATIVE)
inputs.dir("src/data/PredictionSummary")
outputs.dir(outputDir)
Expand All @@ -61,6 +61,13 @@ tasks.register("runNetwork", JavaExec.class) {
mainClass = "net.twisterrob.blt.data.apps.TravelNetworkParser"
args = [ inputDir, outputDir ]
enableAssertions = true
doFirst {
outputDir.mkdirs()
standardOutput = new File(outputDir, "runNetwork.log").newOutputStream()
TWiStErRob marked this conversation as resolved.
Show resolved Hide resolved
}
doLast {
standardOutput.close()
}
}

tasks.register("runPostCode", JavaExec.class) {
Expand Down
1 change: 1 addition & 0 deletions Data/output/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/*.sql
/*.log
13 changes: 13 additions & 0 deletions buildSrc/src/main/groovy/net.twisterrob.blt.convention.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,16 @@ tasks.withType(JavaCompile).configureEach {
"-Xlint:unchecked",
]
}

if (project.gradle.startParameter.isConfigurationCacheRequested()) {
// TODEL https://github.com/TWiStErRob/net.twisterrob.gradle/issues/511
project.plugins.withId("com.android.application") {
project.VCS.setCurrent$twister_convention_versioning(new net.twisterrob.gradle.vcs.VCSExtension() {
@Override boolean isAvailableQuick() { return false }
@Override boolean isAvailable() { return isAvailableQuick() }
@Override String getRevision() { return "no VCS" }
@Override int getRevisionNumber() { return 0 }
@Override FileCollection files(Project project) { return project.files() }
})
}
}
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.jvmargs=-Xmx2048M -Dorg.gradle.deprecation.trace=true
org.gradle.warning.mode=fail
org.gradle.configuration-cache=true
org.gradle.configuration-cache.problems=fail

android.useAndroidX=true
android.enableJetifier=true
Expand Down
Loading