Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Rename `src/main/groovy` to `src/main/java` in `scala` project.

+review REVIEW-5940

    • -193
    • +0
    ./gradle/api/plugins/scala/ScalaBasePlugin.java
    • -149
    • +0
    ./gradle/api/tasks/ScalaRuntime.java
    • -50
    • +0
    ./gradle/api/tasks/ScalaSourceSet.java
    • -75
    • +0
    ./gradle/api/tasks/scala/AntScalaDoc.java
    • -116
    • +0
    ./gradle/api/tasks/scala/ScalaCompile.java
  1. … 20 more files in changeset.
Convert `scala` classes to Java

+review REVIEW-5940

    • -193
    • +0
    ./gradle/api/plugins/scala/ScalaBasePlugin.groovy
    • -0
    • +193
    ./gradle/api/plugins/scala/ScalaBasePlugin.java
    • -0
    • +70
    ./gradle/api/plugins/scala/ScalaPlugin.java
    • -0
    • +20
    ./gradle/api/plugins/scala/package-info.java
    • -69
    • +0
    ./gradle/api/tasks/scala/AntScalaDoc.groovy
    • -0
    • +75
    ./gradle/api/tasks/scala/AntScalaDoc.java
Convert `scala` project to static Groovy

`AntScalaCompiler` has been converted to Java. The other Groovy classes

(`ScalaBasePlugin`, `ScalaPlugin` and `AntScalaDoc`) are non-internal,

so they are left as Groovy files, but they are already converted to

Java. `@CompileStatic` is enabled for each of them.

+review REVIEW-5940

    • -0
    • +134
    ./gradle/api/internal/tasks/scala/AntScalaCompiler.java
    • -67
    • +131
    ./gradle/api/plugins/scala/ScalaBasePlugin.groovy
    • -17
    • +40
    ./gradle/api/plugins/scala/ScalaPlugin.groovy
    • -33
    • +39
    ./gradle/api/tasks/scala/AntScalaDoc.groovy
Replace usage of `String#format` with good old string concatenation

The rationale behind this change is that while `String#format` is usually admitted as good for readability (this is arguable),

in practice it is very bad for performance. Since Java 6, the JVM (the JIT, to be correct) does a pretty good job at optimizing

string concatenation. However, it is only capable to do so if we're using "dirty" string concatenations (using `+`), or `StringBuilder`.

However, usage of `StringBuilder` is not recommended either for 2 reasons:

1. it significantly decreases code readability

2. in Java 9, String concatenation is even more optimized thanks to `invokedynamic`, and code using `StringBuilder` will *not* benefit

from this optimization.

There are sill leftover `String#format` calls in the code, in the following cases:

- the call is used to generate an exception message. That's 90% of the remaining calls.

- the call is obviously a debug message, often used in `toString` (because as we all know, `toString` should only be used for debugging)

- the format includes specific number formatting patterns

- I missed it

  1. … 226 more files in changeset.
Fix typo

Add a ScalaCompilerOptionsInternal subclass.

+review REVIEW-5904

- This allows us to stop using deprecated methods in our internal

implementation so we don't spew deprecation messages to

users who haven't used deprecated methods.

    • -7
    • +4
    ./gradle/api/tasks/scala/ScalaCompile.java
Add deprecation messages to the getters as well.

+review REVIEW-5829

Add deprecation messages and more documentation.

+review REVIEW-5829

  1. … 2 more files in changeset.
Cleanup documentation and deprecations.

+review REVIEW-5829

  1. … 11 more files in changeset.
Fix up the documentation and deprecation warnings.

+review REVIEW-5829

  1. … 2 more files in changeset.
Setting 'useAnt' should take precedence over 'fork'

+review REVIEW-5829

Also deprecates the fork ScalaComilerOption

+review REVIEW-5829

- This keeps the contract sane.

  1. … 1 more file in changeset.
Deprecate the useAnt option in the ScalaCompileOptions.

+review REVIEW-5829

- Disable deprecation warnings in JreJavaHomeScalaIntegrationTest

- Remove many uses of useAnt = false

  1. … 12 more files in changeset.
Stop using String.join() as it is Java 1.8 only.

+review REVIEW-5815

- This also unbreaks the build.

  1. … 1 more file in changeset.
Refactor the functionality of AntScalaCommandLineWriter elsewhere.

+review REVIEW-5815

- The functionality is pretty generically about escaping command-line arguments

and isn't really specific to Ant or Scala compilers.

    • -1
    • +2
    ./gradle/api/tasks/scala/ScalaDocOptions.java
  1. … 3 more files in changeset.
Fix variable names for double/single quotes.

+review REVIEW-5815

- This also adds tests for empty additionalParameters.

  1. … 1 more file in changeset.
Introduced a factory to create `SourceDirectorySet` instances, to avoid exposing the dependencies of `DefaultSourceDirectorySet` to all the places that need to create a `SourceDirectorySet`.

  1. … 36 more files in changeset.
Fixing checkstyle errors

+review REVIEW-5763

    • -1
    • +0
    ./gradle/api/tasks/scala/ScalaCompile.java
  1. … 1 more file in changeset.
Making Zinc Scala compiler multi-process safe

+review REVIEW-5763

    • -1
    • +2
    ./gradle/api/tasks/scala/ScalaCompile.java
  1. … 8 more files in changeset.
Deprecated a bunch of classes in the public API for removal in 3.0. These are either not used, in which case they will be removed, or only intended to be used internally, in which case they will be moved into an internal home.

  1. … 12 more files in changeset.
Renamed TaskDependencyContainer.resolve() to visitDependencies().

  1. … 26 more files in changeset.
Changed LazilyInitializedFileCollection so that it is-a CompositeFileCollection. Removed now unused DelegatingFileCollection

  1. … 7 more files in changeset.
Changed LazilyInitializedFileCollection to also implement TaskDependencyContainer.

  1. … 5 more files in changeset.
Changed LazilyInitializedFileCollection so that it does not create delegate until task dependencies are queried, added a displayName property. This makes it look more like CompositeFileCollection, which it will be merged into.

  1. … 5 more files in changeset.
Removed scala console tasks

From the discussion, located at:

https://discuss.gradle.org/t/scalaconsole-fails-for-gradle-2-6/11147,

it was suggested that the scalaConsole task be removed, since it

doesn't have ay automated test coverage, wasn't documened and

wasn't ever finshed properly.

    • -14
    • +0
    ./gradle/api/plugins/scala/ScalaBasePlugin.groovy
  1. … 1 more file in changeset.
Removed scala console tasks

From the discussion, located at:

https://discuss.gradle.org/t/scalaconsole-fails-for-gradle-2-6/11147,

it was suggested that the scalaConsole task be removed, since it

doesn't have ay automated test coverage, wasn't documened and

wasn't ever finshed properly.

    • -13
    • +0
    ./gradle/api/plugins/scala/ScalaBasePlugin.groovy
Minor simplification in calculation of task dependencies for Groovy and Scala runtimes.

  1. … 1 more file in changeset.
Fixed invalid javadoc

  1. … 3 more files in changeset.
Removed duplicate package-info files

    • -20
    • +0
    ./gradle/api/tasks/scala/package-info.java
  1. … 4 more files in changeset.
Make all implementations of FileCollection implement the internal protocol.

+review REVIEW-5481

  1. … 13 more files in changeset.