DefaultScriptHandlerTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Replace most usages of `NamedObjectInstantiator.INSTANCE` with injection of a global service instead. This allows the instantiator to be contextualized, for example to handle caching of the generated types.

  1. … 25 more files in changeset.
Replace most usages of `NamedObjectInstantiator.INSTANCE` with injection of a global service instead. This allows the instantiator to be contextualized, for example to handle caching of the generated types.

  1. … 27 more files in changeset.
Replace most usages of `NamedObjectInstantiator.INSTANCE` with injection of a global service instead. This allows the instantiator to be contextualized, for example to handle caching of the generated types.

  1. … 27 more files in changeset.
Replace most usages of `NamedObjectInstantiator.INSTANCE` with injection of a global service instead. This allows the instantiator to be contextualized, for example to handle caching of the generated types.

  1. … 27 more files in changeset.
To avoid confusion, remove mention of "platform" from "target Java platform"

We already have the "Java Platform" plugin which is something quite

different from the concept we want to express when using "target java platform".

This is more often known as the "JVM version", or "target Java version". We

use "JVM" because this is not specific to Java.

  1. … 25 more files in changeset.
Add bundling attribute on configurations

In the Java ecosystem, resolvable configurations now declare that they

require the bundling attribute valued as external.

Issue #8380

  1. … 8 more files in changeset.
Rename the Java target platform attribute

This is to avoid confusion: while "minimal" makes sense from

the producer point of view, it reads strange when seen from

the consumer side: the "minimal" version here can be higher

than what a producer has. So it's now simplified to "target

platform".

  1. … 15 more files in changeset.
Introduce a `JAVA_API_JARS` usage

This commit introduces a new `JAVA_API_JARS` usage, mirror

to the `JAVA_RUNTIME_JARS` usage. This is both for consistency,

and to make sure that the `JAVA_API` and `JAVA_RUNTIME` usages

are limited to cases where the consumer doesn't care, or when

a producer doesn't have a more specific usage to provide.

This is, for example, the case for Java platforms. It's worth

noting than in case a producer mixes both "generic" usages

and "specific" usages, selection is likely to produce unexpected

results, because of disambiguation rules.

The Java disambiguation rule has been simplified and now

supports more cases.

  1. … 37 more files in changeset.
Add usage attribute to buildscript classpath

The classpath configuration used by build and init scripts to build

their classpath was lacking the `Usage` attribute.

It is now properly configured to be `java-runtime` given the role of

this configuration.

Fixes #7826

  1. … 4 more files in changeset.
Detangle composite build project from core

- Use a core ScriptClassPathResolver to convert `Configuration` -> `ClassPath`

- Allow modules to contribute initializers to execute when resolving classpath

    • -10
    • +10
    ./DefaultScriptHandlerTest.groovy
  1. … 12 more files in changeset.
Only load buildscript artifacts when running in a composite

- If no included builds are present, there's no need to load

the ArtifactCollection for the `classpath` configuration.

  1. … 6 more files in changeset.
Execute included builds directly when resolving plugin classpath

Artifacts from included builds that are included in the buildscript

classpath are built "on demand". This does not address issues with

building these artifacts, but does remove this behaviour from

other included build dependencies.

  1. … 14 more files in changeset.
Improve property and method lookup from some configuration closures, by short-circuiting the inefficient lookup in `Closure` and reusing the lookup in `ConfigureDelegate` instead.

Currently this improvement is applied only in a few places in the DSL, in particular when configuring any named container (but not its elements). A later change will roll this out more widely.

This change also removed duplicate property and method lookup on the owner object for these closures, improves error reporting on missing property or method so that the actual target of the configure closure is reported, and also cleans up the closure parameter and closure.delegate objects that are visible to the closure body so that they are always the target object.

  1. … 13 more files in changeset.
Don't create build script classpath resolution services until they are required.

  1. … 2 more files in changeset.
Defer creation and resolution of build script classpath configuration until required.

    • -12
    • +44
    ./DefaultScriptHandlerTest.groovy
  1. … 8 more files in changeset.
Load “new style” plugins on top of the core classloader, not the plugins classloader.

  1. … 9 more files in changeset.
Introduce ClassLoaderScope.

Attempts to model the class loader relationships more explicitly, and encapsulate class loader creation. It also allows lazy classloader creation (in a more obvious way than before) which allows short circuiting in the classloader hierarchy.

    • -125
    • +4
    ./DefaultScriptHandlerTest.groovy
  1. … 80 more files in changeset.
Remove unneeded method.

  1. … 2 more files in changeset.
Fix for unit test on java 5 and ibm jvm.

A partial fix for performance regression when compiling scripts. Problem is still there when scripts use the new plugins { } block.

Solution is to defer creation of a project's script class loader until after the script's class path has been finalised, so that the simplest class loader graph can be created to meet the requirements declared in the script.

  1. … 23 more files in changeset.
Changed DefaultScriptHandler to attempt to create the fewest number of ClassLoaders given the script classpath and parent ClassLoaders.

  1. … 1 more file in changeset.
Moved creation of ScriptClassLoader to DefaultScriptHandler and decoupled everything else from ScriptClassLoader.

    • -15
    • +12
    ./DefaultScriptHandlerTest.groovy
  1. … 8 more files in changeset.
Added ScriptClassLoaderProvider.addParent() to allow parents for the script class loader to be declared prior to creation of the script class loaders.

  1. … 9 more files in changeset.
Change the script classloader structure to include classes added by plugin application using the new DSL.

This is an incomplete solution as there is no attempt made to try and reuse classloaders and their classes… meaning that the same class loaded in two different projects are not going to be the same runtime class.

  1. … 20 more files in changeset.
Moved MutableURLClassLoader to baseServices project.

  1. … 17 more files in changeset.
deprecated SourceSetContainer/ConfigurationContainer.add methods in favor of create methods

- changed usages of add methods to create methods

- ported DefaultScriptHandlerTest to spock spec

    • -53
    • +42
    ./DefaultScriptHandlerTest.groovy
  1. … 31 more files in changeset.
- Added ClasspathSource, to allow a ClassLoader to make its classpath available via ClasspathUtil.getClasspath() without making it parent(s) visible. - Fixed broken int tests. - Removed the 'observable' bit from ObservableUrlClassLoader and renamed it to MutableURLClassLoader.

  1. … 18 more files in changeset.
Fixed test broken by ConfigureUtil change.

  1. … 1 more file in changeset.
Renamed subprojects/gradle-(.+) to subprojects/$1

    • -0
    • +100
    ./DefaultScriptHandlerTest.groovy
  1. … 6178 more files in changeset.