-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding gradle support #75
base: master
Are you sure you want to change the base?
Conversation
In the CircleCI interface, is there a way that I can see what the exact command is being run? I can see
but I'd like to see the value of the variables :) I'd also love to see how exactly is the test pipeline job configured... From MPLPipelineTest.groovy
Is it using the right repo? :D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So overall - the new build system should follow use the same rules as the default one. For sure here should be no binaries in the change (check wrapper jar).
That's the things I found for now.
@@ -1 +1,8 @@ | |||
/target | |||
.idea |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check the list - here should be just the ignores related to the project, not your environment. Your env settings you can put to global gitignore of your environment.
mpl.iml | ||
.factorypath | ||
.gradle/** | ||
build/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The POSIX text line ends with newline symbol, so any text file should contain the newline in the end.
} | ||
|
||
dependencies { | ||
compile group: 'org.codehaus.groovy', name: 'groovy-all', version: '3.0.3' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The versions should be in sync with maven configs.
compile group: 'com.lesfurets', name: 'jenkins-pipeline-unit', version: '1.1' | ||
|
||
testCompile group: 'junit', name: 'junit', version: '4.12' | ||
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.+' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why mockito is here? The deps should be quite the same as in maven build - minimal number of deps.
} | ||
} | ||
|
||
jacocoTestReport { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like some custom report not actually needed or should be in sync with maven.
dependsOn prepareForTests | ||
// using grape causes issues with missing classpaths | ||
// as gradle does not use ivy by default. | ||
systemProperty 'groovy.grape.enable', 'false' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, I thought maven allows to use grapes and they could be used by tests sometimes, maybe to figure out what's wrong with it instead of just disabling? Maybe it's just your env issue?
@@ -2,7 +2,11 @@ | |||
* Common build module | |||
*/ | |||
|
|||
MPLModule('Maven Build', CFG) | |||
if ( fileExists('build.gradle')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You changing the interface here, there should be other way because default build system is maven, but still way to use gradle build for circleci automation (also need to be added as a separated pipeline).
* Simple Gradle Build | ||
*/ | ||
|
||
sh './gradlew clean build' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, not sure it's a great jenkins-way - maybe use tool of jenkins? Just imagine the strict environment where is no access to the internet (quite common in the most companies).
@@ -24,6 +24,8 @@ | |||
import org.junit.Before | |||
import org.junit.Test | |||
|
|||
import java.nio.file.Paths |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why it's needed?
@@ -40,6 +42,8 @@ class BuildTest extends MPLTestBase { | |||
void setUp() throws Exception { | |||
String sharedLibs = this.class.getResource('.').getFile() | |||
|
|||
println("sharedLibs: ${sharedLibs}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why needed?
And about hte build - yeah, looks like it not supports the fork repos for now, will check what to do to fix that. |
Hi @Napo2k , I fixed the issue with building from the fork - so please rebase your changes on top of master branch. |
I will implement the changes when I have time |
When working into taking MPL into my current company, I made an effort to make it compatible with gradle - since we use gradle a lot more than maven
This PR brings those changes back into mainline, hopefully without breaking maven support