lombok.ast icon indicating copy to clipboard operation
lombok.ast copied to clipboard

Create minimal jar for code analysis and transformations

Open rspilker opened this issue 9 years ago • 6 comments

We want to deliver a separate lightweight jar without dependencies on Parboiled, Guava and cmdreader.

Jar 1, transformations

  • lombok.ast
  • lombok.ast.ecj
  • lombok.ast.javac
  • lombok.ast.resolve

Jar 2, everything

For jar 1, we should remove some of the Guava static factory methods, like Lists.newArrayList()

rspilker avatar Nov 25 '15 09:11 rspilker

@tnorbye Tor, how can we verify we didn't break the lint tool. Any suggestions on how to test it?

rspilker avatar Dec 16 '15 20:12 rspilker

Hi there, the detailed build instructions are found here: http://tools.android.com/build/

but the short TLDR is this: (1) install repo $ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo $ chmod a+x ~/bin/repo

(2) check out the tools: $ repo init -u https://android.googlesource.com/platform/manifest -b studio-1.5 $ repo sync

(3) build lint and run its tests: $ cd tools $ ./gradlew :base:lint-tests:test

The current Lombok version used is specified in tools/base/libs/lint-api/build.gradle: compile 'com.android.tools.external.lombok:lombok-ast:0.2.3'

Change this to something else, such as compile files('libs/your-version.jar')

Let me know if you have any problems.

-- Tor

On Wed, Dec 16, 2015 at 1:00 PM, Roel Spilker [email protected] wrote:

@tnorbye https://github.com/tnorbye Tor, how can we verify we didn't break the lint tool. Any suggestions on how to test it?

— Reply to this email directly or view it on GitHub https://github.com/rzwitserloot/lombok.ast/issues/10#issuecomment-165237970 .

tnorbye avatar Dec 16 '15 21:12 tnorbye

FAILURE: Build failed with an exception.

* Where:
Build file '/datadisk/androidlint/tools/build.gradle' line: 81

* What went wrong:
A problem occurred evaluating root project 'tools'.
> A problem occurred configuring project ':dataBinding:compiler'.
   > Could not resolve all dependencies for configuration ':dataBinding:compiler:classpath'.
      > Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.0.0-beta-1103.
        Searched in the following locations:
            file:/datadisk/androidlint/tools/data-binding/internal-prebuilts/org/jetbrains/kotlin/kotlin-gradle-plugin/1.0.0-beta-1103/kotlin-gradle-plugin-1.0.0-beta-1103.pom
            file:/datadisk/androidlint/tools/data-binding/internal-prebuilts/org/jetbrains/kotlin/kotlin-gradle-plugin/1.0.0-beta-1103/kotlin-gradle-plugin-1.0.0-beta-1103.jar
            file:/datadisk/androidlint/prebuilts/tools/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin/1.0.0-beta-1103/kotlin-gradle-plugin-1.0.0-beta-1103.pom
            file:/datadisk/androidlint/prebuilts/tools/common/m2/repository/org/jetbrains/kotlin/kotlin-gradle-plugin/1.0.0-beta-1103/kotlin-gradle-plugin-1.0.0-beta-1103.jar
            file:/datadisk/androidlint/out/repo/org/jetbrains/kotlin/kotlin-gradle-plugin/1.0.0-beta-1103/kotlin-gradle-plugin-1.0.0-beta-1103.pom
            file:/datadisk/androidlint/out/repo/org/jetbrains/kotlin/kotlin-gradle-plugin/1.0.0-beta-1103/kotlin-gradle-plugin-1.0.0-beta-1103.jar
            file:/datadisk/androidlint/prebuilts/tools/common/offline-m2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.0.0-beta-1103/kotlin-gradle-plugin-1.0.0-beta-1103.pom
            file:/datadisk/androidlint/prebuilts/tools/common/offline-m2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.0.0-beta-1103/kotlin-gradle-plugin-1.0.0-beta-1103.jar
            file:/datadisk/androidlint/prebuilts/maven_repo/android/org/jetbrains/kotlin/kotlin-gradle-plugin/1.0.0-beta-1103/kotlin-gradle-plugin-1.0.0-beta-1103.pom
            file:/datadisk/androidlint/prebuilts/maven_repo/android/org/jetbrains/kotlin/kotlin-gradle-plugin/1.0.0-beta-1103/kotlin-gradle-plugin-1.0.0-beta-1103.jar
            file:/datadisk/androidlint/prebuilts/gradle-plugin/org/jetbrains/kotlin/kotlin-gradle-plugin/1.0.0-beta-1103/kotlin-gradle-plugin-1.0.0-beta-1103.pom
            file:/datadisk/androidlint/prebuilts/gradle-plugin/org/jetbrains/kotlin/kotlin-gradle-plugin/1.0.0-beta-1103/kotlin-gradle-plugin-1.0.0-beta-1103.jar
        Required by:
            com.android.databinding:compiler:1.0

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1 mins 1.507 secs

rspilker avatar Dec 17 '15 01:12 rspilker

This is a known problem. See https://groups.google.com/forum/?fromgroups#!topic/adt-dev/wFoyxymYuuI

rspilker avatar Dec 17 '15 19:12 rspilker

Thanks, I've pinged the Gradle plugin people about this.

-- Tor

On Thu, Dec 17, 2015 at 11:10 AM, Roel Spilker [email protected] wrote:

This is a known problem. See https://groups.google.com/forum/?fromgroups#!topic/adt-dev/wFoyxymYuuI

— Reply to this email directly or view it on GitHub https://github.com/rzwitserloot/lombok.ast/issues/10#issuecomment-165551524 .

tnorbye avatar Dec 17 '15 20:12 tnorbye

Ok, try again now; they've reset the branch properly. I just confirmed that I could build the branch using the earlier instructions.

-- Tor

On Thu, Dec 17, 2015 at 12:37 PM, Tor Norbye [email protected] wrote:

Thanks, I've pinged the Gradle plugin people about this.

-- Tor

On Thu, Dec 17, 2015 at 11:10 AM, Roel Spilker [email protected] wrote:

This is a known problem. See https://groups.google.com/forum/?fromgroups#!topic/adt-dev/wFoyxymYuuI

— Reply to this email directly or view it on GitHub https://github.com/rzwitserloot/lombok.ast/issues/10#issuecomment-165551524 .

tnorbye avatar Dec 18 '15 23:12 tnorbye