Gradle build updates

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
47 messages Options
12345
Reply | Threaded
Open this post in threaded view
|

Gradle build updates

Cédric Champeau
Hi folks,

As promised I spent some time reworking the Gradle build. For those interested, you can take a look at the progress checking out my branch [1].

You'll notice that the build should be much faster [2], especially after changes, and it now makes use of the build cache. I also got rid of the crazy way to build the indy jars, it's now streamlined.

I'm interested in feedback, since it's a potential breaking change. If everything goes well, I will backport the changes to the 2.5/2.6 builds (so please avoid changes there too).

Thanks a lot,

Reply | Threaded
Open this post in threaded view
|

Re: Gradle build updates

Daniel.Sun
Hi  Cédric,

      It looks fine to me.

      BTW,  the following commit will break the build(my bad...), please
pull the latest code.
https://github.com/melix/groovy-core/commit/fb00a0465e378bc9070f1e7dec4550fb778812ae

Cheers,
Daniel.Sun



--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html
Daniel Sun
Apache Groovy committer

Blog: http://blog.sunlan.me
Twitter: @daniel_sun
Reply | Threaded
Open this post in threaded view
|

Re: Gradle build updates

jnorthr
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Gradle build updates

paulk_asert
The idea (once finished) is that you can still depend on a groovy-all dependency via Maven or Gradle and you'll automatically get the multiple required equivalent jars of the current single groovy-all jar.

Cheers, Paul.

On Mon, Dec 11, 2017 at 5:31 PM, Jim Northrop <[hidden email]> wrote:
Good morning Cedric
Wanted to ask if the removal of the jdk9 version of groovy-all jar will also mean that all us stuck on jdk1.7 will not have newer versions of groovy features? It would seem i would need to revise my gradles to include needed dependencies that groovy-all used to have but not now?
Thanx Jim

Sent from my iPad

> On 11 Dec 2017, at 01:32, Daniel.Sun <[hidden email]> wrote:
>
> Hi  Cédric,
>
>      It looks fine to me.
>
>      BTW,  the following commit will break the build(my bad...), please
> pull the latest code.
> https://github.com/melix/groovy-core/commit/fb00a0465e378bc9070f1e7dec4550fb778812ae
>
> Cheers,
> Daniel.Sun
>
>
>
> --
> Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html

Reply | Threaded
Open this post in threaded view
|

Re: Gradle build updates

Cédric Champeau
That's correct, the branch I have already does this.

2017-12-11 9:25 GMT+01:00 Paul King <[hidden email]>:
The idea (once finished) is that you can still depend on a groovy-all dependency via Maven or Gradle and you'll automatically get the multiple required equivalent jars of the current single groovy-all jar.

Cheers, Paul.

On Mon, Dec 11, 2017 at 5:31 PM, Jim Northrop <[hidden email]> wrote:
Good morning Cedric
Wanted to ask if the removal of the jdk9 version of groovy-all jar will also mean that all us stuck on jdk1.7 will not have newer versions of groovy features? It would seem i would need to revise my gradles to include needed dependencies that groovy-all used to have but not now?
Thanx Jim

Sent from my iPad

> On 11 Dec 2017, at 01:32, Daniel.Sun <[hidden email]> wrote:
>
> Hi  Cédric,
>
>      It looks fine to me.
>
>      BTW,  the following commit will break the build(my bad...), please
> pull the latest code.
> https://github.com/melix/groovy-core/commit/fb00a0465e378bc9070f1e7dec4550fb778812ae
>
> Cheers,
> Daniel.Sun
>
>
>
> --
> Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html


Reply | Threaded
Open this post in threaded view
|

Re: Gradle build updates

Daniel.Sun
Hi  Cédric,

     I tried the distribution built from your fork and encountered the
following issues:

1) apache-groovy-binary-3.0.0-SNAPSHOT.zip contains three
groovy-raw-3.0.0-SNAPSHOT.jar with same size
    * groovy-3.0.0-SNAPSHOT/groovy-raw-3.0.0-SNAPSHOT.jar
    * lib/groovy-raw-3.0.0-SNAPSHOT.jar
    * lib/groovy-raw-3.0.0-SNAPSHOT.jar   -- I'm not kidding...

2) commands fail to run
C:\Users\Daniel>groovy -v
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at
org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:114)
        at
org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:136)
Caused by: java.lang.NoClassDefFoundError: org/objectweb/asm/Opcodes
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
        at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
        at
org.codehaus.groovy.tools.RootLoader.oldFindClass(RootLoader.java:175)
        at
org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:147)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at
org.codehaus.groovy.vmplugin.VMPluginFactory.<clinit>(VMPluginFactory.java:39)
        at
org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:118)
        at
org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:90)
        at groovy.lang.GroovySystem.<clinit>(GroovySystem.java:36)
        at groovy.ui.GroovyMain.processArgs(GroovyMain.java:131)
        at groovy.ui.GroovyMain.main(GroovyMain.java:117)
        ... 6 more
Caused by: java.lang.ClassNotFoundException: org.objectweb.asm.Opcodes
        at
org.codehaus.groovy.tools.RootLoader.findClass(RootLoader.java:179)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at
org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:151)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 24 more

C:\Users\Daniel>groovyConsole
java.lang.ClassNotFoundException: groovy.ui.Console
        at
org.codehaus.groovy.tools.RootLoader.findClass(RootLoader.java:179)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at
org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:151)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at
org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:104)
        at
org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:136)

C:\Users\Daniel>groovySh
java.lang.ClassNotFoundException: org.codehaus.groovy.tools.shell.Main
        at
org.codehaus.groovy.tools.RootLoader.findClass(RootLoader.java:179)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at
org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:151)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at
org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:104)
        at
org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:136)

Cheers,
Daniel.Sun



--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html
Daniel Sun
Apache Groovy committer

Blog: http://blog.sunlan.me
Twitter: @daniel_sun
Reply | Threaded
Open this post in threaded view
|

Re: Gradle build updates

Daniel.Sun

1) apache-groovy-binary-3.0.0-SNAPSHOT.zip contains three
groovy-raw-3.0.0-SNAPSHOT.jar with same size
    * groovy-3.0.0-SNAPSHOT/groovy-raw-3.0.0-SNAPSHOT.jar
    * groovy-3.0.0-SNAPSHOT/lib/groovy-raw-3.0.0-SNAPSHOT.jar   -- corrected
as the absolute path
    * groovy-3.0.0-SNAPSHOT/lib/groovy-raw-3.0.0-SNAPSHOT.jar   -- corrected
as the absolute path




--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html
Daniel Sun
Apache Groovy committer

Blog: http://blog.sunlan.me
Twitter: @daniel_sun
Reply | Threaded
Open this post in threaded view
|

Re: Gradle build updates

Cédric Champeau
Thanks Daniel.

Would you mind trying again? I have fixed the problem I think.

Also we now have a `testWithIndy` task, so a single build is capable of testing both the normal and indy variants.

2017-12-11 10:22 GMT+01:00 Daniel.Sun <[hidden email]>:

1) apache-groovy-binary-3.0.0-SNAPSHOT.zip contains three
groovy-raw-3.0.0-SNAPSHOT.jar with same size
    * groovy-3.0.0-SNAPSHOT/groovy-raw-3.0.0-SNAPSHOT.jar
    * groovy-3.0.0-SNAPSHOT/lib/groovy-raw-3.0.0-SNAPSHOT.jar   -- corrected
as the absolute path
    * groovy-3.0.0-SNAPSHOT/lib/groovy-raw-3.0.0-SNAPSHOT.jar   -- corrected
as the absolute path

Reply | Threaded
Open this post in threaded view
|

Re: Gradle build updates

Cédric Champeau
BTW I have some tests failing with Indy: https://scans.gradle.com/s/5hluytiiafifk/tests/failed

At this point I'm not sure if it's a problem with the new setup, or that it was uncaught before.

2017-12-11 11:10 GMT+01:00 Cédric Champeau <[hidden email]>:
Thanks Daniel.

Would you mind trying again? I have fixed the problem I think.

Also we now have a `testWithIndy` task, so a single build is capable of testing both the normal and indy variants.

2017-12-11 10:22 GMT+01:00 Daniel.Sun <[hidden email]>:

1) apache-groovy-binary-3.0.0-SNAPSHOT.zip contains three
groovy-raw-3.0.0-SNAPSHOT.jar with same size
    * groovy-3.0.0-SNAPSHOT/groovy-raw-3.0.0-SNAPSHOT.jar
    * groovy-3.0.0-SNAPSHOT/lib/groovy-raw-3.0.0-SNAPSHOT.jar   -- corrected
as the absolute path
    * groovy-3.0.0-SNAPSHOT/lib/groovy-raw-3.0.0-SNAPSHOT.jar   -- corrected
as the absolute path


Reply | Threaded
Open this post in threaded view
|

Re: Gradle build updates

paulk_asert
The Sql ones look like they are testing DataSets which require the source files to be on the classpath. Sounds like the new setup isn't quite right but I haven't dived into into yet - perhaps the old build was also wrong in that regard.

On Mon, Dec 11, 2017 at 8:23 PM, Cédric Champeau <[hidden email]> wrote:
BTW I have some tests failing with Indy: https://scans.gradle.com/s/5hluytiiafifk/tests/failed

At this point I'm not sure if it's a problem with the new setup, or that it was uncaught before.

2017-12-11 11:10 GMT+01:00 Cédric Champeau <[hidden email]>:
Thanks Daniel.

Would you mind trying again? I have fixed the problem I think.

Also we now have a `testWithIndy` task, so a single build is capable of testing both the normal and indy variants.

2017-12-11 10:22 GMT+01:00 Daniel.Sun <[hidden email]>:

1) apache-groovy-binary-3.0.0-SNAPSHOT.zip contains three
groovy-raw-3.0.0-SNAPSHOT.jar with same size
    * groovy-3.0.0-SNAPSHOT/groovy-raw-3.0.0-SNAPSHOT.jar
    * groovy-3.0.0-SNAPSHOT/lib/groovy-raw-3.0.0-SNAPSHOT.jar   -- corrected
as the absolute path
    * groovy-3.0.0-SNAPSHOT/lib/groovy-raw-3.0.0-SNAPSHOT.jar   -- corrected
as the absolute path



12345