-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: adjust the Gradle-based GooeyCLI setup
* Moves it to a maybe more sensible place in the gradle directory where the wrapper lives, this seems kinda related * Standardizes the source path so we don't need to explicitly configure it * Drops the Groovy dependency (in Gradle) down to match what's currently in the Gradle Wrapper (although it would still get fetched and used separately for any sort of GooeyCLI *build* process)
- Loading branch information
Showing
17 changed files
with
41 additions
and
33 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright 2020 The Terasology Foundation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
apply plugin: 'groovy' | ||
|
||
group 'org.terasology.cli' | ||
|
||
repositories { | ||
jcenter() | ||
} | ||
|
||
dependencies { | ||
compile 'org.codehaus.groovy:groovy-all:2.5.10' | ||
compile 'info.picocli:picocli-groovy:4.3.2' | ||
compile 'org.fusesource.jansi:jansi:1.18' | ||
compile 'org.ajoberstar:grgit:1.9.3' | ||
} | ||
|
||
// Ugly hack to allow Gradle and @Grab to get along. See https://github.com/gradle/gradle/issues/1031 - not sure if worth it? | ||
compileGroovy { | ||
// Create temp file. | ||
File temp = File.createTempFile("config", ".groovy"); | ||
|
||
// Delete temp file when program exits. | ||
temp.deleteOnExit(); | ||
|
||
// Write to temp file | ||
BufferedWriter out = new BufferedWriter(new FileWriter(temp)); | ||
out.write("""\ | ||
withConfig(configuration) { | ||
configuration.setDisabledGlobalASTTransformations(['groovy.grape.GrabAnnotationTransformation'] as Set) | ||
} | ||
""".stripIndent()); | ||
out.close(); | ||
groovyOptions.configurationScript = temp | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters