build-init.gradle

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Convert `build-init` build script to Kotlin

  1. … 2 more files in changeset.
Revert temporary workaround

Temporary workaround to unblock release branching

Add missing import

Add missing import

Merge CORE and PLUGIN module types

  1. … 28 more files in changeset.
Fix header of generated build init versions resource. Also updated to Scala 2.12.

  1. … 1 more file in changeset.
Move the logic to update the build-init version resource into the `gradle/gradle` build.

This allows the logic to be specific to the current Gradle version rather than attempting to work for versions that might be promoted, for example when the resource format or target JVM changes or a new library or plugin is required. This also allows the versions to be updated at any time, rather than only during release branching.

Converted many Groovy script to Kotlin and improved the Kotlin DSL usage in some existing Kotlin scripts.

  1. … 95 more files in changeset.
Introduced the property moduleType to derive source compatibility settings

  1. … 80 more files in changeset.
Added gradlebuild namespace to plugins and more modularization in buildSrc

- Added to all plugins in buildSrc "gradlebuild." to their id

- Shortened plugin names

- Added ide and docs as additional modules

- Applied java-library plugin to Kotlin projects to model dependencies

  1. … 86 more files in changeset.
"coordinate" -> "coordinates"

  1. … 60 more files in changeset.
Move dependency constraints into a separate project

  1. … 69 more files in changeset.
Restructure dependency declarations in Gradle build

This change:

- Separates dependencies of main build (Gradle distribution), buildSrc,

and test-only dependencies

- Replaces all "old" rules with constraints and/or metadata rules

with reasons

- Declares dependencies that end up in the Gradle distribution as strict

To avoid unnecessary downgrade rules, we now respect the wish for version

upgrades from transitive dependencies where possible. As consequence,

the following upgrades were performed in the Gradle distribution:

- com.beust:jcommander 1.12 -> 1.47

- com.google.code.findbugs:jsr305 1.3.9 -> 2.0.1

- commons-codec:commons-codec 1.6 -> 1.9

- commons-io:commons-io 2.2 -> 2.4

- net.sourceforge.nekohtml:nekohtml 1.9.14 -> 1.9.20

- org.apache.httpcomponents:httpclient 4.4.1 -> 4.5.2

- org.codehaus.plexus:plexus-utils 2.1 -> 3.0.8

  1. … 22 more files in changeset.
Extract allTestRuntimeDependencies and reuse

Signed-off-by: Paul Merlin <paul@gradle.com>

  1. … 4 more files in changeset.
Extract idiomatic test-fixtures plugin to buildSrc

Plugin is applied to all "groovy projects", see `groovyProject.gradle`.

The plugin configures the Project as a test fixtures producer if

`src/testFixtures` is a directory.

The plugin configures the Project as a test fixtures consumer according

to the `testFixtures` extension configuration.

No more Groovy Closure with optional parameters as a Project extra

property.

Test-fixtures configuration rely on a Groovy DSL only feature that

allows to pass a collection of dependency notations when declaring

dependencies. The Kotlin DSL lacks this feature, see

https://github.com/gradle/kotlin-dsl/issues/639

A workaround has been put in place in `build-extensions.kt` in order to

move forward until this is properly fixed in the Kotlin DSL.

Signed-off-by: Paul Merlin <paul@gradle.com>

  1. … 70 more files in changeset.
Make the Classycle configuration more idiomatic

by replacing the configuration function useClassycle() as extra project

property with a plugins {} block plugin request and a project extension.

The classycle extension has two properties, one for the excludes defined

per project, the other one to reference the report resources zip.

This change will make configuring classycle from Kotlin DSL scripts

nicer.

Introduce kotlin-dsl-upstream.kt in buildSrc org.gradle.kotlin.dsl

package for members missing from the Gradle Kotlin DSL intended to be

pulled upstream into the next Gradle Kotlin DSL release.

A sole extension added: reified ObjectFactory.listProperty()

Signed-off-by: Paul Merlin <paul@gradle.com>

  1. … 54 more files in changeset.
build-init integ tests do not require a gradle distribution

at the expense of a large integTestRuntime classpath

running them from both cli & ide now works and take code changes into account

  1. … 7 more files in changeset.
Coverage for groovy/kotlin build generation by init build plugin

  1. … 34 more files in changeset.
Detangle ivy module descriptor parser

This commit removes the Ivy module descriptor parser as a service, because it unfortunately introduced

a lot of tangling between projects, making it necessary to introduce `project(':ivy')` as a dependency

to almost all projects.

This commit removes the parser as a service and creates it on demand. It should not have a big impact

on performance since there should be only one instance in global scope, through `IvyResolver`.

  1. … 19 more files in changeset.
Turn `ModuleExclusions` into a build scoped service

  1. … 53 more files in changeset.
Use fixed library versions in build init templates

This removes the dynamic version calculation for libraries from

the build init project and replaces it with fixed versions

(latest released) of the libraries.

The code for updating the version file with newer stable releases,

has been moved to the 'gradle promote' build and will be automatically

executed when a new release cycle is started. In case it is needed,

selected versions can still be manually updated during a release cycle.

+review REVIEW-6282

  1. … 1 more file in changeset.
Revert "Used fixed versions for build init templates"

This reverts commit 13f38ba699afd86d7cdc4ed8fd7dd3960c0b1f97.

We do not want to use fixed version on master.

+review REVIEW-6252

Merge branch 'release'

Used fixed versions for build init templates

Gradle builds started failing on every branch on Java 7 two days ago when TestNG released a new version (6.9.13) built with Java 8.

java.lang.UnsupportedClassVersionError: org/testng/ITestListener : Unsupported major.minor version 52.0

This can be seen e.g. here on CI: https://builds.gradle.org/viewLog.html?buildId=1322067

The root cause of this is that we use dynamic versions (latest.release) to resolve versions of librairies used in the build init templates. This is dangerous.

See https://github.com/gradle/gradle/blob/master/subprojects/build-init/build-init.gradle#L39-L84

As a quick fix for 3.1 we use fixed versions on the release branch. We need to think more holistically about that for

3.2.

gradle/build-tool-issues#302

+review REVIEW-6252

Rename CleanProperties to ReproduciblePropertiesWriter

+review REVIEW-6240

  1. … 4 more files in changeset.
Remove timestamps from property files

There are two more jars which could not be cached since

there were timestamps in the property files. We are now

cleaning those.

+review REVIEW-6240

  1. … 2 more files in changeset.
Update subprojects for verifying test file cleanup

  1. … 28 more files in changeset.
build-init does not leak files

- This change also alters the `build-init.gradle` file so that future

tests in this subproject which leak files will cause tests to start

failing.

  1. … 4 more files in changeset.
implement java-library testng init modifier

  1. … 5 more files in changeset.