Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 10F4B200C86 for ; Tue, 16 May 2017 20:50:59 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0FAA0160BA6; Tue, 16 May 2017 18:50:59 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 05CFA160BF5 for ; Tue, 16 May 2017 20:50:54 +0200 (CEST) Received: (qmail 2163 invoked by uid 500); 16 May 2017 18:50:54 -0000 Mailing-List: contact commits-help@polygene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@polygene.apache.org Delivered-To: mailing list commits@polygene.apache.org Received: (qmail 1853 invoked by uid 99); 16 May 2017 18:50:54 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 May 2017 18:50:54 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 10472DFD43; Tue, 16 May 2017 18:50:54 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: paulmerlin@apache.org To: commits@polygene.apache.org Date: Tue, 16 May 2017 18:51:34 -0000 Message-Id: <9a244a6d4b6549688a4c2d1d3fce9c4b@git.apache.org> In-Reply-To: <68236d0633fc4adcbf189c348ad880b6@git.apache.org> References: <68236d0633fc4adcbf189c348ad880b6@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [42/50] [abbrv] polygene-java git commit: Remove the Gradle Wrapper from the source distribution archived-at: Tue, 16 May 2017 18:50:59 -0000 Remove the Gradle Wrapper from the source distribution The required Gradle version is kept in gradle/wrapper/gradle-wrapper.properties The source distribution’s README explain how to get started Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/ac6094d8 Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/ac6094d8 Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/ac6094d8 Branch: refs/heads/master Commit: ac6094d818edcf219210962c2b1369e15970f938 Parents: cf15aa4 Author: Paul Merlin Authored: Mon May 15 18:21:17 2017 +0200 Committer: Paul Merlin Committed: Mon May 15 18:21:26 2017 +0200 ---------------------------------------------------------------------- .../distributions/DistributionsPlugin.groovy | 34 ++++++++++++++++---- distributions/src/src-dist/README.txt | 16 ++++++--- .../src/docs/tutorials/howto-build-system.txt | 7 ++++ 3 files changed, 46 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/polygene-java/blob/ac6094d8/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/distributions/DistributionsPlugin.groovy ---------------------------------------------------------------------- diff --git a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/distributions/DistributionsPlugin.groovy b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/distributions/DistributionsPlugin.groovy index 6404495..c7b1958 100644 --- a/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/distributions/DistributionsPlugin.groovy +++ b/buildSrc/src/main/groovy/org/apache/polygene/gradle/structure/distributions/DistributionsPlugin.groovy @@ -56,6 +56,7 @@ import org.gradle.plugins.signing.SigningExtension import java.nio.file.Files import java.nio.file.Path +// TODO Split each distribution as a separate plugin // TODO Expose all project outputs into configurations @CompileStatic class DistributionsPlugin implements Plugin @@ -78,6 +79,7 @@ class DistributionsPlugin implements Plugin static final String CHECK_SOURCE_DIST = 'checkSourceDistribution' static final String CHECK_BINARY_DIST = 'checkBinaryDistribution' private static final String RAT_SOURCE_DIST = 'ratSourceDistribution' + private static final String INSPECT_SOURCE_DIST = 'inspectSourceDistribution' private static final String BUILD_SOURCE_DIST = 'buildSourceDistribution' private static final String RAT_BINARY_DIST = 'ratBinaryDistribution' } @@ -121,7 +123,6 @@ class DistributionsPlugin implements Plugin spec.include '*.txt' spec.include 'doap.rdf' spec.include '*.gradle' - spec.include 'gradlew*' spec.include 'gradle/**' spec.include 'etc/**' spec.include 'buildSrc/**' @@ -142,7 +143,14 @@ class DistributionsPlugin implements Plugin spec.exclude 'settings.gradle' spec.exclude 'gradle.properties' // Excludes + spec.exclude '**/.git/**' // Git directories + spec.exclude '**/.git*' // Git files spec.exclude '**/build/**' // Build output + spec.exclude 'gradlew*' // Gradle wrapper scripts + spec.exclude 'gradle/wrapper/*.jar' // Gradle wrapper JAR + spec.exclude '**/.gradle/**' // Gradle caches + spec.exclude '**/.gradletasknamecache' // Gradle shell completion cache + spec.exclude '**/node_modules/**' // Node's node_module dir spec.exclude 'derby.log' // Derby test garbage spec.exclude '**/*.iml' // IDEA files spec.exclude '**/*.ipr' // IDEA files @@ -154,11 +162,6 @@ class DistributionsPlugin implements Plugin spec.exclude '**/.settings' // Eclipse files spec.exclude '**/.nb-gradle/**' // Netbeans files spec.exclude '**/.nb-gradle*' // Netbeans files - spec.exclude '**/.git/**' // Git directories - spec.exclude '**/.git*' // Git files - spec.exclude '**/.gradle/**' // Gradle caches - spec.exclude '**/.gradletasknamecache' // Gradle shell completion cache - spec.exclude '**/node_modules/**' // Node's node_module dir spec.into '.' } @@ -286,11 +289,28 @@ class DistributionsPlugin implements Plugin 'tools/generator-polygene/app/templates/Heroes/**', ] } as Action ) + project.tasks.create( TaskNames.INSPECT_SOURCE_DIST ) { Task task -> + task.group = TaskGroups.DISTRIBUTION_VERIFICATION + task.description = 'Inspects various aspects of the source distribution.' + task.dependsOn TaskNames.STAGE_SOURCE_DIST + task.onlyIf { !releaseSpec.developmentVersion } + task.doLast { + // ad-hoc checks to the source distribution ----------------------- + def assertFilePresent = { String path -> assert new File( unpackedSrcDistDir, path ).isFile() } + def assertFileAbsent = { String path -> assert !new File( unpackedSrcDistDir, path ).isFile() } + + assertFileAbsent 'gradlew' + assertFileAbsent 'gradlew.bat' + assertFileAbsent 'gradle/wrapper/gradle-wrapper.jar' + assertFilePresent 'gradle/wrapper/gradle-wrapper.properties' + } + } project.tasks.create( TaskNames.BUILD_SOURCE_DIST, ExecLogged, { ExecLogged task -> task.group = TaskGroups.DISTRIBUTION_VERIFICATION task.description = 'Checks the source distribution by running `gradle build` inside.' task.dependsOn TaskNames.STAGE_SOURCE_DIST task.mustRunAfter TaskNames.RAT_SOURCE_DIST + task.mustRunAfter TaskNames.INSPECT_SOURCE_DIST def workDir = project.file( "$project.buildDir/tmp/${ TaskNames.BUILD_SOURCE_DIST }" ) task.inputs.dir unpackedSrcDistDir task.workingDir = workDir @@ -310,7 +330,7 @@ class DistributionsPlugin implements Plugin } as Action ) project.tasks.create( TaskNames.CHECK_SOURCE_DIST ) { Task task -> task.description = "Checks the source distribution." - task.dependsOn TaskNames.RAT_SOURCE_DIST, TaskNames.BUILD_SOURCE_DIST + task.dependsOn TaskNames.RAT_SOURCE_DIST, TaskNames.INSPECT_SOURCE_DIST, TaskNames.BUILD_SOURCE_DIST } } http://git-wip-us.apache.org/repos/asf/polygene-java/blob/ac6094d8/distributions/src/src-dist/README.txt ---------------------------------------------------------------------- diff --git a/distributions/src/src-dist/README.txt b/distributions/src/src-dist/README.txt index 7a2d996..de6c218 100644 --- a/distributions/src/src-dist/README.txt +++ b/distributions/src/src-dist/README.txt @@ -42,11 +42,19 @@ https://polygene.apache.org/java/latest/howto-depend-on-polygene.html Building Apache Polygene --------------------- -To build Polygene™ from sources you only need to have a valid Java JDK >= 7 -installation. +To build Polygene™ from sources you only need to have a valid Java JDK >= 8 +installation and any version of Gradle. -If you want to build the Polygene™ manual, then you also need valid Asciidoc -(http://www.methods.co.nz/asciidoc/) and Docbook-XSL installations. +This distribution embeds the exact version of Gradle needed to build Polygene™. +It is in the gradle/wrapper/gradle-wrapper.properties file. +Here is how to bootstrap that version: + + gradle wrapper + +This will download the required Gradle distribution and create gradlew and +gradlew.bat script files that you should use from now on. + +Once you have the wrapper installed you can invoke the build system. Here is how to run a full build with checks: http://git-wip-us.apache.org/repos/asf/polygene-java/blob/ac6094d8/manual/src/docs/tutorials/howto-build-system.txt ---------------------------------------------------------------------- diff --git a/manual/src/docs/tutorials/howto-build-system.txt b/manual/src/docs/tutorials/howto-build-system.txt index 86460f0..45c8b10 100644 --- a/manual/src/docs/tutorials/howto-build-system.txt +++ b/manual/src/docs/tutorials/howto-build-system.txt @@ -45,6 +45,13 @@ Build System configuration is done through Gradle properties. This can be done in many ways, see https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_properties_and_system_properties[Gradle properties and system properties]. +== The Wrapper == + +`gradlew` and `gradlew.bat` scripts that can be found at the root of the Polygene sources is *The Wrapper*. +Any build invocation starts from this script. +It will download the Gradle distribution version required by the build. +See the https://docs.gradle.org/current/userguide/gradle_wrapper.html[Gradle Wrapper] documentation for more details. + == Main tasks == The Polygene™ SDK project has tasks that work with the whole SDK.