Quantcast

gradle: Call for testing!

classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

gradle: Call for testing!

Felix Natter
Administrator
hello,

Blair and I have almost finished the gradle build system for freeplane
1.4. It is contained in the branch 'Gradle_builds', and I have updated
the git howto:
  http://freeplane.sourceforge.net/wiki/index.php/Git_howto

- the checkout procedure is the same
(http://freeplane.sourceforge.net/wiki/index.php/Git_howto#Initial_checkout_.28.22clone.22.29)
except that you don't have to import projects after clone (the projects are not
contained in git, but generated by gradle in the post-checkout steps)

- For post-checkout steps I created separate instructions for ant
  and gradle:
  http://freeplane.sourceforge.net/wiki/index.php/Git_howto#Post-checkout_operations

I think it's IMPORTANT THAT YOU GIVE THIS A TRY so that we can identify
issues BEFORE the merge to 1.4.x (which may lead to people being
blocked)!

If you have questions regarding this, please post here, and we'll answer
quickly.

Thanks also to Dimitry for helping solve some tough problems with OSGi
and generally helping!

If there is some interest in an overview (or an in-depth look at the
structure) of the gradle build scripts, I'll be happy to host a session
on skype (and teamviewer) or answer questions here :-)

Here is the list of items that still need fixing:
- sign applet jar
- read versioninfo.properties (currently version = '1.4.1' is hardcoded
  in /build.gradle)
- automatic tagging of releases
- latex syntax highlighting does not work yet (eclipse only)
- IntelliJ (thankfully Blair is working on this, but this is not a release-stopper)
- include BUILD, DIST in .gitignore?

but I think more issues will pop up as you find them (and I certainly
forgot things).

Cheers and Best Regards!
--
Felix Natter
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gradle: Call for testing!

Felix Natter
Administrator
hi,

I plan to merge this (Gradle_builds->1.4.x) within the next few days, unless you want/need more time for testing
(in which case please post here!).

Cheers and Best Regards,
Felix
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gradle: Call for testing!

theworldbright
In reply to this post by Felix Natter
Hey Felix!

I checked out Gradle_Builds and gave the following command a try:

sudo gradle clean build cleanEclipse eclipse --stacktrace

:freeplane_mac:compileJava
/Users/kent/Documents/Freeplane/freeplane_mac/src/main/java/org/freeplane/plugin/macos/MacChanges.java:33: error: package com.apple.eawt does not exist
import com.apple.eawt.*;



FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':freeplane_mac:compileJava'.
> Compilation failed; see the compiler error output for details.

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

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':freeplane_mac:compileJava'.

I'm on a Mac OS X 10.9.5 with Gradle version 2.3.


I have also tried Import -> Gradle -> Gradle Project -> Freeplane Root Folder -> Build Model -> Select All but Freeplane_mac -> Finish (which is how I import most other Gradle-based projects). I have gotten the following error:

FAILURE: Build failed with an exception.

* What went wrong:
Could not create service of type TaskArtifactStateCacheAccess using TaskExecutionServices.createCacheAccess().
> Failed to create parent directory '/Users/kent/Documents/Freeplane/.gradle/2.1' when creating directory '/Users/kent/Documents/Freeplane/.gradle/2.1/taskArtifacts'

* 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.521 secs
[sts] Build failed
org.gradle.tooling.BuildException: Could not execute build using Gradle distribution 'https://services.gradle.org/distributions/gradle-2.1-bin.zip'.
        at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:53)

Regards,

Kent
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gradle: Call for testing!

theworldbright
I made Gradle not compile freeplane_mac and the build succeeds. I have a feeling it has something to do with not having Apple's Java 6 on my computer. Now I am having trouble importing the projects into Eclipse. There are 46 errors.



(Apologies for editing this message 3 times)

Regards,

Kent
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Aw: Re: gradle: Call for testing!

Felix Natter
Administrator
hi Kent,
> sudo gradle clean build cleanEclipse eclipse --stacktrace
 
do not use sudo when calling gradle. Gradle does not need root privileges,
and I think this:
 
>Could not create service of type TaskArtifactStateCacheAccess using TaskExecutionServices.createCacheAccess().
>> Failed to create parent directory '/Users/kent/Documents/Freeplane/.gradle/2.1' when creating directory '/Users/kent/Documents/Freeplane/.gradle/2.1/taskArtifacts'
is a subsequent error (.gradle created as root and read - using gradle plugin - by 'kent').
 
> I made Gradle not compile freeplane_mac and the build succeeds. I have a feeling it has something to do with not having Apple's Java 6 on my computer.
Dimitry had similar problems. But the solution to enable = false compileJava on freeplane_mac is ok since the mac build currently isn't used
(freeplanemac.jar is committed).
 
> Now I am having trouble importing the projects into Eclipse. There are 46 errors.
> /private/var/root/.gradle
These errors are definitely a result of "sudo gradle". "sudo gradle clean build cleanEclipse eclipse"
will download deps and generate .classpath for each project. Since you ran gradle as root, the deps are
referenced from there which does not work.
 
You may have to delete some .gradle folders because they have been created with the root user.
 
If you can't get it to work I can offer a skype session Thursday evening.
 
Cheers and Best Regards,
Felix
Gesendet: Mittwoch, 25. März 2015 um 00:23 Uhr
Von: "theworldbright [via Freeplane Developer]" <[hidden email]>
An: "Felix Natter" <[hidden email]>
Betreff: Re: gradle: Call for testing!
I made Gradle not compile freeplane_mac and the build succeeds. I have a feeling it has something to do with not having Apple's Java 6 on my computer. Now I am having trouble importing the projects into Eclipse. There are 46 errors.

Errors

Regards,

Kent
 
If you reply to this email, your message will be added to the discussion below:
http://freeplane-developer.996965.n3.nabble.com/gradle-Call-for-testing-tp629p632.html
To start a new topic under Freeplane Developer, email [hidden email]
To unsubscribe from Freeplane Developer, click here.
NAML
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gradle: Call for testing!

Dimitry Polivaev
Administrator
In reply to this post by theworldbright
This is not gradle but java 8 compiler issue which would also come if you compiled with ant.

https://bugs.openjdk.java.net/browse/JDK-8008714

So to compile freeplane_mac you should point your JAVA_HOME to jdk 1.7 folder.
As Felix already said usually we do not have to compile freeplanemac.jar again.
I hope that Java 9 fixes this compiler problem.

Regards,
Dimitry

> I made Gradle not compile freeplane_mac and the build succeeds. I have a feeling it has something to
> do with not having Apple's Java 6 on my computer. Now I am having trouble importing the projects
> into Eclipse. There are 46 errors.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Aw: Re: gradle: Call for testing!

theworldbright
In reply to this post by Felix Natter
>> These errors are definitely a result of "sudo gradle".

Yeah, I had some permission denied errors, so I thought using sudo would resolve the problem. I didn't expect for it to have such consequences; I used chmod instead to deal with the permission denied.

I got the project successfully imported into Eclipse. I'm now currently getting familiar problems where Freeplane does not launch as a separate application: http://freeplane-developer.996965.n3.nabble.com/Setting-Up-Eclipse-and-Documentation-td98.html. I can't remember how this problem was fixed. I have JAVA_HOME now pointed to 1.7. Dimitry do you remember?

Regards,

Kent
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Aw: Re: gradle: Call for testing!

Dimitry Polivaev
Administrator
> I got the project successfully imported into Eclipse. I'm now currently getting familiar problems
> where Freeplane does not launch as a separate application:

Have you tried launcher freeplane_framework/eclipse/launchers/freeplane-osgi-mac.launch ?

Dimitry

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Aw: Re: gradle: Call for testing!

theworldbright
I've gotten the following error with freeplane-osgi-mac:

!ENTRY org.freeplane.plugin.script 4 0 2015-03-25 14:02:57.460
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.freeplane.plugin.script [3]
  Unresolved requirement: Import-Package: jsyntaxpane.actions

        at org.eclipse.osgi.container.Module.start(Module.java:434)



Caused by: java.lang.UnsupportedClassVersionError: org/freeplane/main/osgi/Activator : Unsupported major.minor version 52.0

The error seems fairly familiar. I have my JAVA_HOME set to 1.7 and my eclipse preferences are using 1.7 also. I've tried changing the runtime configuration to 1.7 too, without luck.

Regards,

Kent
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Aw: Re: gradle: Call for testing!

Dimitry Polivaev
Administrator
I tried to fix it.
Please pull and try again.

Regards, Dimitry
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Aw: Re: gradle: Call for testing!

theworldbright
I think I tried exactly what you did. I pulled and tried again anyways with the same error.

Regards,

Kent
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Aw: Re: gradle: Call for testing!

Dimitry Polivaev
Administrator
Unsupported major.minor version 52.0 actually means that the files were compiled with Java 8
compiler by eclipse. Eclipse has its own compiler settings and ignores those for gradle and JAVA_HOME.

I expect that you can run the launcher with Java 8 RTE, but I do not understand how Java 8 came in play.

Try to clean and rebuild all projects.

Eventually I need to have look at your computer with a team viewer.

Regards,
Dimitry
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gradle: Call for testing!

theworldbright
Hmm so that means Gradle probably compiled them with Java 8 before the files were imported in Eclipse?

Regards,

Kent

On Mar 25, 2015, at 2:42 PM, Dimitry Polivaev [via Freeplane Developer] <[hidden email]> wrote:

Unsupported major.minor version 52.0 actually means that the files were compiled with Java 8
compiler by eclipse. Eclipse has its own compiler settings and ignores those for gradle and JAVA_HOME.

I expect that you can run the launcher with Java 8 RTE, but I do not understand how Java 8 came in play.

Try to clean and rebuild all projects.

Eventually I need to have look at your computer with a team viewer.

Regards,
Dimitry



If you reply to this email, your message will be added to the discussion below:
http://freeplane-developer.996965.n3.nabble.com/gradle-Call-for-testing-tp629p640.html
To unsubscribe from gradle: Call for testing!, click here.
NAML

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gradle: Call for testing!

Dimitry Polivaev
Administrator
The opposite: eclipse does not use class files compiled by gradle

> Hmm so that means Gradle probably compiled them with Java 8 before the files were imported in Eclipse?

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gradle: Call for testing!

theworldbright
I got it working! So I apparently did not re-compile the source code after switching my JAVA_HOME to 1.7 using Gradle. So basically Eclipse was using the .class files that was compiled with 1.8. Now my problem is that the ribbons menu is collapsed in the left hand corner, and I cannot find a way to pull it to the right.



Regards,

Kent

On Mar 25, 2015, at 2:51 PM, Dimitry Polivaev [via Freeplane Developer] <[hidden email]> wrote:

The opposite: eclipse does not use class files compiled by gradle

> Hmm so that means Gradle probably compiled them with Java 8 before the files were imported in Eclipse?




If you reply to this email, your message will be added to the discussion below:
http://freeplane-developer.996965.n3.nabble.com/gradle-Call-for-testing-tp629p642.html
To unsubscribe from gradle: Call for testing!, click here.
NAML

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gradle: Call for testing!

theworldbright
In reply to this post by Dimitry Polivaev
I re-ran Freeplane and now the ribbons bar is back to normal. I’m not so sure what happened, but it is working fine now. Thanks for all your help with getting the Gradle_build branch working on my Mac.

Regards,

Kent

On Mar 25, 2015, at 2:56 PM, Kent <[hidden email]> wrote:

I got it working! So I apparently did not re-compile the source code after switching my JAVA_HOME to 1.7 using Gradle. So basically Eclipse was using the .class files that was compiled with 1.8. Now my problem is that the ribbons menu is collapsed in the left hand corner, and I cannot find a way to pull it to the right.

<Screen Shot 2015-03-25 at 2.50.39 PM.png>

Regards,

Kent

On Mar 25, 2015, at 2:51 PM, Dimitry Polivaev [via Freeplane Developer] <[hidden email]> wrote:

The opposite: eclipse does not use class files compiled by gradle

> Hmm so that means Gradle probably compiled them with Java 8 before the files were imported in Eclipse?




If you reply to this email, your message will be added to the discussion below:
http://freeplane-developer.996965.n3.nabble.com/gradle-Call-for-testing-tp629p642.html
To unsubscribe from gradle: Call for testing!, click here.
NAML


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gradle: Call for testing!

Felix Natter
Administrator
hello Kent,

"theworldbright [via Freeplane Developer]"
<[hidden email]> writes:

> I re-ran Freeplane and now the ribbons bar is back to normal. I’m not so sure what
> happened, but it is working fine now. Thanks for all your help with getting the
> Gradle_build branch working on my Mac.

Please tell me when you are done with testing so that I can merge this
into 1.4.x (no need to hurry, take your time).

Cheers and Best Regards,
--
Felix Natter
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gradle: Call for testing!

theworldbright
Hey Felix,

I'm done testing. Thanks.

Regards,

Kent
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gradle: Call for testing!

Felix Natter
Administrator
"theworldbright [via Freeplane Developer]"
<[hidden email]> writes:

> Hey Felix,

hello Kent,

> I'm done testing. Thanks.

Could you please run (on updated 1.4.x branch):
$ gradle dist

and test-run:
- DIST/freeplane_macos_bin-1.4.1-alpha.zip AND
- DIST/*.dmg
?

Thanks and Best Regards,
Felix

> Regards,
>
> Kent
>
> ----------------------------------------------------------------------------------------
> If you reply to this email, your message will be added to the discussion below:
> http://freeplane-developer.996965.n3.nabble.com/gradle-Call-for-testing-tp629p647.html
> To start a new topic under Freeplane Developer, email [hidden email]
> To unsubscribe from Freeplane Developer, click here.
> NAML
>

--
Felix Natter
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gradle: Call for testing!

theworldbright
Hey Felix!

DIST/freeplane_macos_bin-1.4.1-alpha.zip

and

DIST/freeplane_app-1.4.1-alpha.dmg

are both working!

Regards,

Kent


On Mar 28, 2015, at 2:18 AM, Felix Natter [via Freeplane Developer] <[hidden email]> wrote:

"theworldbright [via Freeplane Developer]"
<<a href="x-msg://3/user/SendEmail.jtp?type=node&amp;node=650&amp;i=0" target="_top" rel="nofollow" link="external">[hidden email]> writes:

> Hey Felix,

hello Kent,

> I'm done testing. Thanks.

Could you please run (on updated 1.4.x branch):
$ gradle dist

and test-run:
- DIST/freeplane_macos_bin-1.4.1-alpha.zip AND
- DIST/*.dmg
?

Thanks and Best Regards,
Felix

> Regards,
>
> Kent
>
> ----------------------------------------------------------------------------------------
> If you reply to this email, your message will be added to the discussion below:
> http://freeplane-developer.996965.n3.nabble.com/gradle-Call-for-testing-tp629p647.html
> To start a new topic under Freeplane Developer, email <a href="x-msg://3/user/SendEmail.jtp?type=node&amp;node=650&amp;i=1" target="_top" rel="nofollow" link="external">[hidden email]
> To unsubscribe from Freeplane Developer, click here.
> NAML
>
--
Felix Natter



If you reply to this email, your message will be added to the discussion below:
http://freeplane-developer.996965.n3.nabble.com/gradle-Call-for-testing-tp629p650.html
To unsubscribe from gradle: Call for testing!, click here.
NAML

12
Loading...