Un mémorandum personnel pour l'installation de gradle sur votre Mac. Je pense qu'il est difficile d'oublier et d'installer le pot à chaque fois.
$ brew update
J'obtiens une erreur, alors je vais dégager comme écrit
$ brew untap homebrew/homebrew-dupes $ brew untap homebrew/homebrew-x11
$ brew install gradle
$ brew cleanup
Accédez au répertoire contenant build.gradle etc.
$ gradle
j'ai compris
Welcome to Gradle 5.4! Here are the highlights of this release: - Run builds with JDK12 - New API for Incremental Tasks - Updates to native projects, including Swift 5 support For more details see https://docs.gradle.org/5.4/release-notes.html Starting a Gradle Daemon (subsequent builds will be faster) > Task :help Welcome to Gradle 5.4. To run a build, run gradle... To see a list of available tasks, run gradle tasks To see a list of command-line options, run gradle --help To see more detail about a task, run gradle help --task For troubleshooting, visit https://help.gradle.org BUILD SUCCESSFUL in 12s 1 actionable task: 1 executed
$ gradle tasks
> Task :tasks ------------------------------------------------------------ Tasks runnable from root project ------------------------------------------------------------ Build tasks ----------- assemble - Assembles the outputs of this project. build - Assembles and tests this project. buildDependents - Assembles and tests this project and all projects that depend on it. buildNeeded - Assembles and tests this project and all projects it depends on. classes - Assembles main classes. clean - Deletes the build directory. jar - Assembles a jar archive containing the main classes. testClasses - Assembles test classes. Build Setup tasks ----------------- init - Initializes a new Gradle build. wrapper - Generates Gradle wrapper files. Documentation tasks ------------------- javadoc - Generates Javadoc API documentation for the main source code. Help tasks ---------- buildEnvironment - Displays all buildscript dependencies declared in root project 'ArtNet for Java'. components - Displays the components produced by root project 'ArtNet for Java'. [incubating] dependencies - Displays all dependencies declared in root project 'ArtNet for Java'. dependencyInsight - Displays the insight into a specific dependency in root project 'ArtNet for Java'. dependentComponents - Displays the dependent components of components in root project 'ArtNet for Java'. [incubating] help - Displays a help message. model - Displays the configuration model of root project 'ArtNet for Java'. [incubating] projects - Displays the sub-projects of root project 'ArtNet for Java'. properties - Displays the properties of root project 'ArtNet for Java'. tasks - Displays the tasks runnable from root project 'ArtNet for Java'. Verification tasks ------------------ check - Runs all checks. test - Runs the unit tests. Rules ----- Pattern: clean: Cleans the output files of a task. Pattern: build : Assembles the artifacts of a configuration. Pattern: upload : Assembles and uploads the artifacts belonging to a configuration. To see all tasks and more detail, run gradle tasks --all To see more detail about a task, run gradle help --task BUILD SUCCESSFUL in 2s 1 actionable task: 1 executed
$ gradle build
BUILD SUCCESSFUL in 21s 4 actionable tasks: 4 executed
En cas de succès, un fichier jar sera généré dans le répertoire build / libs. bonheur.
Recommended Posts