Get latest changes from SVN and update Git repo state.
======== Gradle========.. contents:: :local:Getting help============:: $ gradle --helpWorking with subprojects========================Getting list of subprojects:: $ gradle projectsRunning build on specific subproject:: $ gradle :$SUB:clean $ gradle -p $SUB cleanIf subproject lies in hierarchy:: $ gradle :$SUB/$SUBSUB:clean $ gradle -p $SUB/$SUBSUB cleanSkip building dependent modules, build just current module:: $ gradle -a build $ gradle --no-rebuild build $ gradle -a :client:buildCreating multilevel project:: $ mkdir $PRJROOT $ cd $PRJROOT $ mkdir lvl1 lvl1/lvl2 $ touch build.gradle lvl1/build.gradle lvl1/lvl2/build.gradle $ { echo include "'lvl1'"; echo include "'lvl1/lvl2'"; } >settings.gradle $ gradle projects``settings.gradle`` can include per line or a list of subprojects:: include 'sub1', 'sub2', 'sub2' include 'lvl1' include 'lvl1/lvl2'https://docs.gradle.org/current/userguide/intro_multi_project_builds.htmlhttp://stackoverflow.com/questions/16976214/gradle-build-only-one-moduleRunning completely isolated build=================================To avoid using global cache and for really clean build use:: $ gradle --no-daemon --gradle-user-home ./.gradle.localManaging tasks==============List tasks:: $ gradle tasksGetting list of supported tasks in each subproject:: $ gradle tasks --allGetting help on task:: $ gradle help --task build $ gradle -q help --task buildSimilar but to each task:: $ gradle modelSkip task during build with ``-x`` option:: $ gradle -x test build $ gradle -x :core:build :client:buildBuild sources=============:: $ gradle compileJava $ gradle compileTestJavaBuild with additional options and checks:: compileJava { options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" } compileTestJava { options.encoding = 'UTF-8' options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" }To apply change recursively to subprojects:: subprojects { tasks.withType(JavaCompile) { options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" } }Run main class==============:: $ gradle runRun tests=========To run test:: $ gradle testTo select specific test or pattern use ``--tests`` option, like:: $ gradle test --tests com.evil.UtitTest $ gradle test --tests com.evil.UtitTest.login $ gradle test --tests '*'BasicTest.login $ gradle test --tests '*BasicTest.calc*'To skip tests in build:: $ gradle -x test buildAlternative solution involves passing system property with ``build.gradle``:: test.onlyIf { ! Boolean.getBoolean('skip.tests') }To run tests with additional registered checks:: $ gradle check.. note:: ``--rerun-tasks`` option *specifies that any task optimization is ignored*. In that way you may rerun tests even if there are no changed files:: $ gradle test --rerun-tasksBy default ``System.out`` and ``Sysyem.err`` redirected so you wouldn't seeanything about test on console.Quick way to see test output is:: $ gradle test -iAlternatively configure ``test`` task:: test { testLogging { events "passed", "skipped", "failed" //, "standardOut", "standardError" showExceptions true exceptionFormat "full" showCauses true showStackTraces true showStandardStreams = false } }Stopping server===============:: $ gradle --stopList project dependencies=========================List of project execution dependencies (it also download dependencies):: $ gradle dependencies $ gradle dependencies --configuration compile $ gradle dependencies -p $SUBPROJ $ gradle :$SUBPROJ:dependencies $ gradle :$SUBPROJ:dependencies --configuration testCompileList of project plugin dependencies:: $ gradle buildEnvironment $ gradle buildEnvironment -p $SUBPROJ $ gradle :$SUBPROJ:buildEnvironmentPaths to dependencies can be printed via task:: task printDepPaths { doLast { configurations.runtime.each { println it } } }All dependencies can be copied to single directory via task:: task copyRuntimeLibs(type: Copy) { into "lib" from configurations.runtime // from configurations.testRuntime - configurations.runtime }List project properties=======================:: $ gradle properties $ gradle :$SUBPROJ:properties $ gradle properties -p $SUBPROJDry tun=======``-m`` option allow parsing build scripts without actually executing them:: $ gradle -m clean compileBootstrap project structure===========================This creates simple project with Gradle boilerplate files:: $ gradle init --type java-libraryTo convert Maven project (with ``pom.xml`` file) to Gradle project use:: $ gradle init --type pomhttps://docs.gradle.org/current/userguide/build_init_plugin.html Official docs on ``init`` plugin.Gradle wrapper==============With Gradle v2.4 and above:: $ cd $PROJ $ gradle wrapper --gradle-version 3.5It will add ``gradle/wrapper/gradle-wrapper.jar`` to project root and next callto ``./gradlew`` download Gradle distribution from ``distributionUrl`` parameterfrom ``gradle/wrapper/gradle-wrapper.properties`` file. Dictribution will becached in ``~/.gradle/wrapper/dists.gradle/wrapper/dists`` directory so nextcalls won't require download.Alternatively define task:: task wrapper(type: Wrapper) { gradleVersion = '2.0' }For increase security add ``distributionSha256Sum`` parameter to``gradle-wrapper.properties`` file. Distribution SHA-256 sum can be obtained via``shasum`` utility.https://docs.gradle.org/current/userguide/gradle_wrapper.html Official docs.Managing Gradle cache=====================Work in offline mode with ``--offline`` option.Invalidate cache (force re-downloading dependencies) with``--refresh-dependencies`` option.Alternatively remove ``~/.m2/repository/`` and ``~/.gradle/caches`` directories.Gradle cached modules declared as *changing*:: dependencies { compile("com.evil:evil-api:1.0.1-SNAPSHOT") { changing=true } }Default timeout is 24 hours and can be reset/changed via:: configurations.all { resolutionStrategy.cacheChangingModulesFor 0, 'seconds' }Download sources and javadoc of dependencies============================================To download sources and javadoc of dependencies to local ``~/.gradle`` cache add``idea`` plugin to your ``build.gradle``:: apply plugin: 'idea' idea.module.downloadJavadoc = true idea.module.downloadSources = trueand invoke plugin:: $ gradle ideaTo wipe out Idea projects file after plug-in run:: $ gradle cleanIdea