Skip to content

Commit

Permalink
move CLI and added into package
Browse files Browse the repository at this point in the history
  • Loading branch information
pollend authored and Cervator committed Jul 11, 2020
1 parent d21e82a commit 4a9dc64
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright 2020 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0
package org.terasology.cli;

import picocli.CommandLine.Command

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2020 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0

package org.terasology.cli;
import picocli.CommandLine.ParentCommand
import picocli.CommandLine.Command
// Actually in use, annotation below may show syntax error due to Groovy's annotation by the same name. Works fine
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2020 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0

package org.terasology.cli;
import picocli.CommandLine.Option

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright 2020 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0
package org.terasology.cli

// Grab the Groovy extensions for PicoCLI - in IntelliJ Alt-ENTER on a `@Grab` to register contents for syntax highlighting
@Grab('info.picocli:picocli-groovy:4.3.2')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2020 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0

package org.terasology.cli;
import picocli.CommandLine.Command
import picocli.CommandLine.Help.Ansi
// Is in use, IDE may think the Groovy-supplied is in use below and mark this unused
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2020 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0

package org.terasology.cli;
/**
* Simple command type class that indicates the command deals with "items" - nested Git roots representing application elements
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2020 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0

package org.terasology.cli;
@GrabResolver(name = 'jcenter', root = 'http://jcenter.bintray.com/')
@Grab(group = 'org.ajoberstar', module = 'grgit', version = '1.9.3')
import org.ajoberstar.grgit.Grgit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2020 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0

package org.terasology.cli;
class ManagedModule extends ManagedItem {
ManagedModule() {
super()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright 2020 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0
package org.terasology.cli;

import picocli.CommandLine.Command
import picocli.CommandLine.HelpCommand
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2020 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0

package org.terasology.cli;
/**
* Convenience class for pulling properties out of a 'gradle.properties' if present, for various overrides
* // TODO: YAML variant that can be added for more complex use cases?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2020 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0

package org.terasology.cli;
import picocli.CommandLine.ParentCommand
import picocli.CommandLine.Command
import picocli.CommandLine.Mixin
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2020 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0

package org.terasology.cli;
import picocli.CommandLine.ParentCommand
import picocli.CommandLine.Command
import picocli.CommandLine.Mixin
Expand Down
4 changes: 2 additions & 2 deletions gw
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ fi
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`

JAVACMD=`cygpath --unix "$JAVACMD"`

# We build the pattern for arguments to be converted via cygpath
Expand Down Expand Up @@ -180,6 +180,6 @@ save () {
APP_ARGS=`save "$@"`

# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GroovyWrapperMain config/groovy/GooeyCLI.groovy "$APP_ARGS"
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GroovyWrapperMain config/groovy/org/terasology/cli/GooeyCLI.groovy "$APP_ARGS"

exec "$JAVACMD" "$@"

0 comments on commit 4a9dc64

Please sign in to comment.