language-java.gradle

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Fix dependencies to the new snapshots project

  1. … 5 more files in changeset.
Convert `language-java` build script to Kotlin

  1. … 2 more files in changeset.
Remove dependency on Java 7 in our build (#6494)

### Context

Currently we need 3 JDKs to build Gradle:

- Java 7 to compile most code

- Our build runs on Java 8

- Java 9 to compile some code using Java 9 API.

Our goal is to use only one JDK. After this PR, we can:

- If running the build on Java 9/10, we can only use a single JDK.

- If running the build on Java 8, we still need an extra JDK to compile some code using Java 9 API. After we migrate all CI builds to Java 9/10, we may completely drop the support for running on Java 8.

However, with https://youtrack.jetbrains.com/issue/IDEA-197550 unsolved, we still can't run Gradle integration tests in IDEA with JDK 10. Everything else would work fine on JDK10.

#### Remove multiple compiler JDKs

Previously, we use different JDKs to compile different subprojects, which made things really complicated. This PR greatly simplify the compiler selection code, after this PR, we only need one single Java9-compatible JDK to compile all code.

#### Refine verification mechanism

Previously, we had verification for:

- If build cache enabled, verify the current build is running on Java 8 because CI is running on Java 8.

- If running some specific tasks (e.g. distribution generation), verify the build/compiler JDK is Oracle JDK.

This PR does the following improvements:

- Since all `Compile` tasks share a common compiler, verify that compiler is Java9-compatible. Oracle JDK is not mandatory.

- If running some specific tasks (e.g. distribution generation), verify the build/compiler JDK is Oracle JDK.

This PR collects these verification into a single plugin, instead of code everywhere previously.

  1. … 14 more files in changeset.
Converted many Groovy script to Kotlin and improved the Kotlin DSL usage in some existing Kotlin scripts.

  1. … 95 more files in changeset.
Preliminary support for building Gradle on Java 9 (#5811)

This is a follow-up of https://github.com/gradle/gradle/pull/5749 . #5749 introduced Java 9 compiler but broke IDE import. This PR aims at fixing IDE import. With this PR, we can run `./gradlew idea` and set project SDK to JDK 9 to run integration tests.

The changes are:

- Upgrade javaassist to JDK9-compatible version

- Adds empty implementation to `AnnotationProcessingCompileTask` and `ResourceCleaningCompilationTask`

- Remove support of Java 5 because Java 9 can't generate Java 5 bytecode any more.

- Slightly increased wrapper size limitation because two extra classes are added.

  1. … 21 more files in changeset.
Move cleanup plugin into cleanup subproject

- Add integration test using TestKit

- Rewrite EmptyDirectoryCheck to use Provider API

  1. … 26 more files in changeset.
Convert dependency management related subprojects to kotlin-dsl (#4498)

This PR also fixes the dependency declarations wrt. api/impl separation

for these and related projects.

It fixes two places in production/test code where dependencies

leaked into the classpath and the wrong classes where imported.

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

  1. … 80 more files in changeset.
Extracted test file cleanup from root build into plugin

- Moved configuration of test file clean into extension

- Added TestFileCleanUpPlugin

- Moved CiReporting and Classycle plugin into codequality module

  1. … 23 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.
Extract idiomatic strict-compile plugin to buildSrc

Sub projects request the plugin if needed.

The plugin configures the Java and Groovy compilation tasks according

to the `strictCompile` extension configuration.

No more Groovy Closures as a Project extra properties.

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

  1. … 30 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.
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.
Changed default Java version for our projects to Java 7. Changed build scripts for those projects that still require Java 6.

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

  1. … 28 more files in changeset.
Reusing compiler daemon across continuous builds

+review REVIEW-5582

  1. … 23 more files in changeset.
apply scala-lang and java-lang in PlayApplicationPlugin to rely on their language registration.

- remove duplicated languageregistration in play application plugin

- add coverage for mixed java-lang + play and scala-lang + play projects

+review REVIEW-5375

  1. … 15 more files in changeset.
Fixed integ test dependencies

  1. … 3 more files in changeset.
share common logic for testing incremental jvm language plugins

+review REVIEW-5273

  1. … 16 more files in changeset.
Minor note on why packages are excluded from cycle checks.

+review REVIEW-5165

Bust up package cycles in incremental compile implementation.

This makes the structure flatter than the ideal, but it will be easier to add structure now cycle detection is enabled.

+review REVIEW-5165

  1. … 47 more files in changeset.
Inline interface with a hardcoded implementation and reorg to bust package cycle.

+review REVIEW-5165

  1. … 13 more files in changeset.
Change the classycle exclude for the javadoc classes from the internal package to the public to signal the cycles are in the public API.

+review REVIEW-5165

Enable strictCompile for ‘language-java’ project

  1. … 9 more files in changeset.
Move Javadoc task related classes to language-java

+review REVIEW-5165

  1. … 110 more files in changeset.
Renamed ‘language-base’ project to ‘platform-base’

  1. … 203 more files in changeset.