Skip to content

Commit

Permalink
updated README and CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
evant committed Mar 31, 2015
1 parent 2044121 commit 542e2d7
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 29 deletions.
35 changes: 27 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,40 @@
### 2.5.0
### 3.0.0
A whole bunch of changes!
- Changed the default retrolambda to 2.0.0
- Added support for default methods, add `defaultMethods true` to the retrolambda block. Note: due
to a current limitation in retrolamba, this will require all of your source code to be fed through
retrolambda on each build. This may adversely affect build times.
- `incremental false` is no longer deprecated but has different semantics. Instead of being a hack
around gradle-retrolambda breaking other plugins, it now only forces all of your class files to be
run through retrolambda instead of only the changed ones.
- Added support for android unit tests, including lambdas in the tests themselves.
- No longer patch the android jar, modify the classpath instead. This should resolve issues with
using gradle-retrolambda with more obscure android sdks, like google glass. This should also speed
up a clean build since it doesn't have to do any zipping shenanigans.
- Ensure the gradle plugin is compiled with java 6 compatibility. This should allow you to run
gradle with an older version of java if you don't want java 8 set as the default. This was always
the intention, but was broken in the last build.
- More minor changes to how the java compile task is replaced, this should ensure better
compatibility with other plugins.

#### 2.5.0
- A more robust fix for android-apt compatibility. Important: If you were experiencing issues with
android-apt previously and updated to this version, you must run `gradle build --rerun-tasks` once.
- Deprecate plugin name 'retrolambda' for 'me.tatarka.retrolambda' in preparation to publishing on
the gradle plugin portal.

### 2.4.1
#### 2.4.1
- Fixed compatibility with android-apt.
- Fixed typo in one of the thrown exceptions. (tomxor)
- Support groovy testing (ex. spock). (harningt)

#### 2.4.0

- Better incremental compile method that doesn't break lint and proguard (and
probably other tasks). Because of this, `retrolambda.incremental` is deprecated
and does nothing.
probably other tasks). Because of this, `retrolambda.incremental` is deprecated
and does nothing.
- Better handling of manually setting the retrolamba version with
`retrolambConfig`.
`retrolambConfig`.
- Don't use the retrolambda javaagent if using version `1.6.0+`.
- Set the default retrolambda version to `1.6.0`.

Expand All @@ -26,12 +45,12 @@ and does nothing.
#### 2.3.0

- Add ability to set `retrolambda.incremental false` to disable incremental compilation, since it is
incompatible with android lint/proguard.
incompatible with android lint/proguard.

#### 2.2.3

- Change dependency back to `localGroovy()`, `org.codehaus.groovy:groovy-all:2.3.3` was causing
issues.
issues.

#### 2.2.2

Expand All @@ -51,7 +70,7 @@ Otherwise, compiling the source set would error out.
#### 2.1.0

- Also check system property 'java.home' for the current java location. IDEs set this but not
JAVA_HOME, so checking here first is more robust. (aphexcx)
JAVA_HOME, so checking here first is more robust. (aphexcx)

#### 2.0.0
- Hooks into gradle's incremental compilcation support. This should mean faster build times and less
Expand Down
34 changes: 13 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Usage
}
dependencies {
classpath 'me.tatarka:gradle-retrolambda:2.6.0'
classpath 'me.tatarka:gradle-retrolambda:3.0.0'
}
}
Expand Down Expand Up @@ -57,6 +57,8 @@ retrolambda {
oldJdk System.getenv("JAVA6_HOME")
javaVersion JavaVersion.VERSION_1_6
jvmArgs '-arg1', '-arg2'
defaultMethods false
incremental true
}
```

Expand All @@ -75,11 +77,15 @@ retrolambda {
- `exclude 'Test'` Sets which sets/variants to not run through retrolambda. Only
one of either `include` or `exclude` should be defined.
- `jvmArgs` Add additional jvm args when running retrolambda.
- `defaultMethods` Turn on default and static methods in interfaces support. Note: due to a
limitation in retrolamba, this will set `incremental` to false. The default is false.
- `incremental` Setting this to false forces all of your class files to be run through retrolambda
instead of only the ones that have changed. The default is true.

### Using a Different Version of the retrolambda.jar

The default version of retrolambda used is
`'net.orfjackal.retrolambda:retrolambda:1.6.0'`. If you want to use a different
`'net.orfjackal.retrolambda:retrolambda:2.0.0'`. If you want to use a different
one, you can configure it in your dependencies.

```groovy
Expand Down Expand Up @@ -114,11 +120,11 @@ This plugin is fully compatible with progurad (since `v2.4.0`). In your progurad
Known Issues
---------------
### Using Google Play Services causes retrolambda to fail
Version `5.0.77` contains bytecode that is incompatible with retrolambda. To
work around this issue, you can either use an earlier version like `4.4.52` or
add `-noverify` to the jvm args. See
[orfjackal/retrolambda#25](https://github.com/orfjackal/retrolambda/issues/25)
for more information.
Version `5.0.77` contains bytecode that is incompatible with retrolambda. This should be fixed in
newer versions of play services, if you can update, that should be the preferred solution. To work
around this issue, you can either use an earlier version like `4.4.52` or add `-noverify` to the jvm
args. See [orfjackal/retrolambda#25](https://github.com/orfjackal/retrolambda/issues/25) for more
information.

```groovy
retrolambda {
Expand All @@ -138,20 +144,6 @@ This is because `android-apt` modifies the `javaCompile` task and this plugin
replaces it. Since `v2.4.1` this is fixed, you just need to ensure you apply
this plugin _before_ `android-apt`.

What Black Magic did you use to get this to work on Android?
------------------------------------------------------------

There were two hurdles to overcome when compiling for android. The gradle
android plugin forces a compile targeting java 6 and uses a custom
bootclasspath that doesn't include necessary java8 files. To overcome this, the
plugin:

1. Overrides `-source` and `-target` with 8.
2. Extracts the necessary files out of the java runtime (rt.jar), and patches
android.jar with them.
3. Sets `-bootclasspath` to point to the patched android.jar

Updates
-------

All updates have moved to the [CHANGELOG](https://github.com/evant/gradle-retrolambda/blob/master/CHANGELOG.md).

0 comments on commit 542e2d7

Please sign in to comment.