Contribution
As I said here I would like to contribute to the GradleFX-Project.
But when trying to prepare myself for coding I have some difficulties to setup everything in the IDE.
What should I use to resolve the dependencies for the
GradleFX-Project?
Are there any tests to run, so I can be sure I didn't break
anything?
I'm trying to do this with IntelliJ IDEA, which I'm pretty new to. But I think I have enough experience with Eclipse to transform any answers targeting it.
Anything else important to know for contributors?
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Yennick Trevels on 13 Apr, 2012 11:53 AM
In Intellij I think you can import the project by using the "import by gradle file" functionality (I'm using Intellij too), then it should resolve the dependencies and configure the source paths (the project's only dependencies are groovy and gradle). I'm not sure that it will configure/download the Gradle API, so if it doesn't then you need to download it manually and configure it.
Other important things:
- There are not unit tests yet, this is something that is on the planning (and really important actually) - As a contributor you'd best fork the project and work on the 'develop' branch. - I'm always installing the GradleFx project to my local repo while testing with "mvn install". Using mavenLocal() in my test project instead of mavenCentral() so it uses my locally installed GradleFx version.
2 Posted by karfau on 13 Apr, 2012 12:19 PM
Is it important which version of gradle I'm using?
(the most current would be 1.0-rc1)
Support Staff 3 Posted by Yennick Trevels on 13 Apr, 2012 12:23 PM
I'm using 1.0-milestone-8, 1.0-rc1 might work but I haven't tested it yet.
4 Posted by karfau on 13 Apr, 2012 08:14 PM
Maybe I'm still missing something:
When running
without i get a BUILD FAILED.
So I run it again with @-debug --stacktrace@ and wrote all output to the attached gradlew.log which I attached.
When commenting out the everything after
it worked.
But I can't import the project into IntelliJ (I tried to use the versions 1.0-milestone-1.0-milestone-3,1.0-milestone-8,1.0-milestone-8a, 1.0-rc) even when commenting out the part above.
It always end with the message als found in the idea.log I attached:
Can't resolve gradle project at 'D:\Coden_projects_git\GradleFX\build.gradle'.[...]
Do I need to have something maven specific installed on my machine?
Support Staff 5 Posted by Yennick Trevels on 14 Apr, 2012 06:54 AM
I'll try to look into it tommorow. Quite a busy weekend :)
Support Staff 6 Posted by Yennick Trevels on 15 Apr, 2012 02:21 PM
k, I found how to import it into Intellij. I expected the Intellij auto import to work correctly but apparently it doesn't. So this is what you have to do:
1. add "apply plugin: 'idea'" to the GradleFx build.gradle file
2. execute the "gradle idea" command from the command line
3. In Intellij go to "File -> Open project" and choose the GradleFx project.
Support Staff 7 Posted by Maxime Cowez on 27 Apr, 2012 04:48 PM
Eclipse configuration
For people interested in working on GradleFx with Eclipse:
1. install Groovy Eclipse plugin
2. give the GradleFx a Groovy nature
3. add all the jars from Gradle's 'lib' dir to the classpath
and Eclipse should now be able to compile without errors.
Gradle version
I'm currently using Gradle 1.0 RC 2. There are two minor changes that affect GradleFx:
1. In
org.gradlefx.tasks.compile.CompC
there is an importorg.gradle.internal.nativeplatform.GenericFileSystem
. This file has moved toorg.gradle.internal.nativeplatform.filesystem.GenericFileSystem
2. In
build.gradle
replacepackaging = 'jar'
withext.packaging = 'jar'
Building
I just use Gradle to build and publish to the local repo as Yennick does.
I did this by replacing the
signing
anduploadArchives
blocks in build.gradle withI also added
build.gradle
to my gitignore so I never accidentally push this change upstream.Now I just type
gradle install
and I usemavenLocal()
when I use/test the plugin.