[jira] [Work logged] (BEAM-3252) Update contributors guide to discuss Gradle
[ https://issues.apache.org/jira/browse/BEAM-3252?focusedWorklogId=89948=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-89948 ] ASF GitHub Bot logged work on BEAM-3252: Author: ASF GitHub Bot Created on: 11/Apr/18 13:32 Start Date: 11/Apr/18 13:32 Worklog Time Spent: 10m Work Description: asfgit closed pull request #414: [BEAM-3252] Updating contributor's guide to reference Gradle. URL: https://github.com/apache/beam-site/pull/414 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/src/contribute/contribution-guide.md b/src/contribute/contribution-guide.md index c8ddd8d0d..4b60154d8 100644 --- a/src/contribute/contribution-guide.md +++ b/src/contribute/contribution-guide.md @@ -246,9 +246,9 @@ to prevent the issue from reoccurring. Java SDK -For contributions to the Java code, run unit tests locally via Maven. +For contributions to the Java code, run checks locally via Gradle. -$ mvn clean verify +$ ./gradlew :beam-sdks-java-core:check --rerun-tasks Python SDK @@ -271,11 +271,11 @@ command. $ tox -e lint_py2,lint_py3 -Beam supports running Python SDK tests using Maven. For this, navigate to root +Beam supports running Python SDK tests using Gradle. For this, navigate to root directory of your Apache Beam clone and execute following command. Currently this cannot be run from a virtual environment. -$ mvn clean verify -pl sdks/python +$ ./gradlew :beam-sdks-python:check --rerun-tasks ## Review diff --git a/src/contribute/intellij.md b/src/contribute/intellij.md index fe3d7fb1a..99291ca2e 100644 --- a/src/contribute/intellij.md +++ b/src/contribute/intellij.md @@ -15,20 +15,25 @@ section_menu: section-menu/contribute.html > > Mastering IntelliJ is, ultimately, your responsibility. -## Enable Annotation Processing +## Create a working Gradle module -To configure annotation processing in IntelliJ: +1. Create an empty IntelliJ project outside of the Beam source tree. +2. Under Project Structure > Project, select a Project SDK. +3. Under Project Structure > Modules, click the + sign to add a module and + select "Import Module". +1. Select the directory containing the Beam source tree. +2. Tick the "Import module from external model" button and select Gradle + from the list. +3. Tick the following boxes. + * Create separate module per source set + * Store generated project files externally + * Use default gradle wrapper +4. Delegate build actions to Gradle by going to Settings > Build, Execution, + Deployment > Build Tools > Gradle and checking "Delegate IDE build/run + actions to gradle". -1. Open Annotation Processors Settings dialog box by going to Settings -> - Build, Execution, Deployment -> Compiler -> Annotation Processors -2. Select the following buttons: - * "Enable annotation processing" - * "Obtain processors from project classpath" - * "Store generated sources relative to: _Module content root_" -3. Set the generated source directories to be equal to the Maven directories: - * Set "Production sources directory:" to `target/generated-sources/annotations` - * Set "Test sources directory:" to `target/generated-test-sources/test-annotations` -4. Click "OK" +This should result in a working Gradle project. Build the project by executing +the "build" task in the root Gradle module. ## Checkstyle @@ -36,7 +41,7 @@ IntelliJ supports checkstyle within the IDE using the Checkstyle-IDEA plugin. 1. Install the "Checkstyle-IDEA" plugin from the IntelliJ plugin repository 2. Configure the plugin by going to Settings -> Other Settings -> Checkstyle -3. Set Checkstyle version to the same as in `/pom.xml` (e.g. 6.19) +3. Set Checkstyle version to the same as in `/build_rules.gradle` (e.g. 8.7) 4. Set the "Scan Scope" to "Only Java sources (including tests)" 5. In the "Configuration File" pane, add a new configuration using the plus icon: 1. Set the "Description" to "Beam" diff --git a/src/contribute/maturity-model.md b/src/contribute/maturity-model.md index 429b04abf..8f8cc040f 100644 --- a/src/contribute/maturity-model.md +++ b/src/contribute/maturity-model.md @@ -42,7 +42,7 @@ The following table summarizes project's self-assessment against the Apache Matu CD30 The code can be built in a reproducible way using widely available standard tools. - YES. The project uses Apache Maven and can be built via https://github.com/apache/beam/blob/master/README.md;>the standard mvn install on any platform. + YES. The project uses Gradle and can be built via
[jira] [Work logged] (BEAM-3252) Update contributors guide to discuss Gradle
[ https://issues.apache.org/jira/browse/BEAM-3252?focusedWorklogId=89946=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-89946 ] ASF GitHub Bot logged work on BEAM-3252: Author: ASF GitHub Bot Created on: 11/Apr/18 13:27 Start Date: 11/Apr/18 13:27 Worklog Time Spent: 10m Work Description: lukecwik commented on issue #414: [BEAM-3252] Updating contributor's guide to reference Gradle. URL: https://github.com/apache/beam-site/pull/414#issuecomment-380451257 @asfgit merge This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 89946) Time Spent: 1h 40m (was: 1.5h) > Update contributors guide to discuss Gradle > --- > > Key: BEAM-3252 > URL: https://issues.apache.org/jira/browse/BEAM-3252 > Project: Beam > Issue Type: Sub-task > Components: build-system, website >Reporter: Luke Cwik >Assignee: Daniel Oliveira >Priority: Major > Time Spent: 1h 40m > Remaining Estimate: 0h > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-3252) Update contributors guide to discuss Gradle
[ https://issues.apache.org/jira/browse/BEAM-3252?focusedWorklogId=89412=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-89412 ] ASF GitHub Bot logged work on BEAM-3252: Author: ASF GitHub Bot Created on: 10/Apr/18 14:40 Start Date: 10/Apr/18 14:40 Worklog Time Spent: 10m Work Description: lukecwik commented on a change in pull request #414: [BEAM-3252] Updating contributor's guide to reference Gradle. URL: https://github.com/apache/beam-site/pull/414#discussion_r180446240 ## File path: src/contribute/intellij.md ## @@ -15,6 +15,22 @@ section_menu: section-menu/contribute.html > > Mastering IntelliJ is, ultimately, your responsibility. +## Create a working Gradle module + +1. Create an empty IntelliJ project outside of the Beam source tree. +2. Under Project Structure > Project, select a Project SDK. +3. Under Project Structure > Modules, click the + sign to add a module and select "Import Module". +1. Select the directory containing the Beam source tree. +2. Tick the "Import module from external model" button and select Gradle from the list. +3. Tick the following boxes. + * Use auto-import + * Create separate module per source set + * Store generated project files externally + * Use default gradle wrapper + +This should result in a working Gradle project. Build the project by executing the "build" task in +the root Gradle module. + ## Enable Annotation Processing Review comment: Based upon your current set of instructions for intellij, I don't believe we need anything additional for the annotation processing. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 89412) Time Spent: 1.5h (was: 1h 20m) > Update contributors guide to discuss Gradle > --- > > Key: BEAM-3252 > URL: https://issues.apache.org/jira/browse/BEAM-3252 > Project: Beam > Issue Type: Sub-task > Components: build-system, website >Reporter: Luke Cwik >Assignee: Daniel Oliveira >Priority: Major > Time Spent: 1.5h > Remaining Estimate: 0h > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-3252) Update contributors guide to discuss Gradle
[ https://issues.apache.org/jira/browse/BEAM-3252?focusedWorklogId=89167=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-89167 ] ASF GitHub Bot logged work on BEAM-3252: Author: ASF GitHub Bot Created on: 09/Apr/18 22:26 Start Date: 09/Apr/18 22:26 Worklog Time Spent: 10m Work Description: youngoli commented on a change in pull request #414: [BEAM-3252] Updating contributor's guide to reference Gradle. URL: https://github.com/apache/beam-site/pull/414#discussion_r180249067 ## File path: src/contribute/intellij.md ## @@ -15,6 +15,22 @@ section_menu: section-menu/contribute.html > > Mastering IntelliJ is, ultimately, your responsibility. +## Create a working Gradle module + +1. Create an empty IntelliJ project outside of the Beam source tree. +2. Under Project Structure > Project, select a Project SDK. +3. Under Project Structure > Modules, click the + sign to add a module and select "Import Module". +1. Select the directory containing the Beam source tree. +2. Tick the "Import module from external model" button and select Gradle from the list. +3. Tick the following boxes. + * Use auto-import + * Create separate module per source set + * Store generated project files externally + * Use default gradle wrapper + +This should result in a working Gradle project. Build the project by executing the "build" task in +the root Gradle module. + ## Enable Annotation Processing Review comment: Ah. So does that mean there's no gradle version of those directories then if the solution is to remove the entire section? Also yes, I'll do that. I already did so for the gradle setup directions, but I ignored the rest of the instructions (annotations, checkstyle, and codestyle). This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 89167) Time Spent: 1h 20m (was: 1h 10m) > Update contributors guide to discuss Gradle > --- > > Key: BEAM-3252 > URL: https://issues.apache.org/jira/browse/BEAM-3252 > Project: Beam > Issue Type: Sub-task > Components: build-system, website >Reporter: Luke Cwik >Assignee: Daniel Oliveira >Priority: Major > Time Spent: 1h 20m > Remaining Estimate: 0h > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-3252) Update contributors guide to discuss Gradle
[ https://issues.apache.org/jira/browse/BEAM-3252?focusedWorklogId=89160=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-89160 ] ASF GitHub Bot logged work on BEAM-3252: Author: ASF GitHub Bot Created on: 09/Apr/18 22:12 Start Date: 09/Apr/18 22:12 Worklog Time Spent: 10m Work Description: lukecwik commented on a change in pull request #414: [BEAM-3252] Updating contributor's guide to reference Gradle. URL: https://github.com/apache/beam-site/pull/414#discussion_r180246568 ## File path: src/contribute/intellij.md ## @@ -15,6 +15,22 @@ section_menu: section-menu/contribute.html > > Mastering IntelliJ is, ultimately, your responsibility. +## Create a working Gradle module + +1. Create an empty IntelliJ project outside of the Beam source tree. +2. Under Project Structure > Project, select a Project SDK. +3. Under Project Structure > Modules, click the + sign to add a module and select "Import Module". +1. Select the directory containing the Beam source tree. +2. Tick the "Import module from external model" button and select Gradle from the list. +3. Tick the following boxes. + * Use auto-import + * Create separate module per source set + * Store generated project files externally + * Use default gradle wrapper + +This should result in a working Gradle project. Build the project by executing the "build" task in +the root Gradle module. + ## Enable Annotation Processing Review comment: Yes, `target` folders refer to Maven. Also, try out the quickstart manually using intellij in a new project. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 89160) Time Spent: 1h 10m (was: 1h) > Update contributors guide to discuss Gradle > --- > > Key: BEAM-3252 > URL: https://issues.apache.org/jira/browse/BEAM-3252 > Project: Beam > Issue Type: Sub-task > Components: build-system, website >Reporter: Luke Cwik >Assignee: Daniel Oliveira >Priority: Major > Time Spent: 1h 10m > Remaining Estimate: 0h > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-3252) Update contributors guide to discuss Gradle
[ https://issues.apache.org/jira/browse/BEAM-3252?focusedWorklogId=89034=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-89034 ] ASF GitHub Bot logged work on BEAM-3252: Author: ASF GitHub Bot Created on: 09/Apr/18 17:25 Start Date: 09/Apr/18 17:25 Worklog Time Spent: 10m Work Description: aaltay commented on issue #414: [BEAM-3252] Updating contributor's guide to reference Gradle. URL: https://github.com/apache/beam-site/pull/414#issuecomment-379829503 My opinion is that, it is better to use gradle based python development in the contribution guide. It makes it uniform across the project and easy to get started. I would think that anyone doing heavy development on python will actually use virtualenv based setup. Let's keep them as an alternative (or advanced) option. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 89034) Time Spent: 50m (was: 40m) > Update contributors guide to discuss Gradle > --- > > Key: BEAM-3252 > URL: https://issues.apache.org/jira/browse/BEAM-3252 > Project: Beam > Issue Type: Sub-task > Components: build-system, website >Reporter: Luke Cwik >Assignee: Daniel Oliveira >Priority: Major > Time Spent: 50m > Remaining Estimate: 0h > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-3252) Update contributors guide to discuss Gradle
[ https://issues.apache.org/jira/browse/BEAM-3252?focusedWorklogId=89016=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-89016 ] ASF GitHub Bot logged work on BEAM-3252: Author: ASF GitHub Bot Created on: 09/Apr/18 16:58 Start Date: 09/Apr/18 16:58 Worklog Time Spent: 10m Work Description: lukecwik commented on issue #414: [BEAM-3252] Updating contributor's guide to reference Gradle. URL: https://github.com/apache/beam-site/pull/414#issuecomment-379821433 @aaltay / @udim For the Python SDK development in the contribution guide, should we prefer gradle since it automatically sets up the virtualenv. It seems like a lot less work for new contributors. There can be Python SDK advanced instructions, similar to how the intellij instructions exists which go through the virtualenv setup, ... This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 89016) Time Spent: 40m (was: 0.5h) > Update contributors guide to discuss Gradle > --- > > Key: BEAM-3252 > URL: https://issues.apache.org/jira/browse/BEAM-3252 > Project: Beam > Issue Type: Sub-task > Components: build-system, website >Reporter: Luke Cwik >Assignee: Daniel Oliveira >Priority: Major > Time Spent: 40m > Remaining Estimate: 0h > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-3252) Update contributors guide to discuss Gradle
[ https://issues.apache.org/jira/browse/BEAM-3252?focusedWorklogId=89012=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-89012 ] ASF GitHub Bot logged work on BEAM-3252: Author: ASF GitHub Bot Created on: 09/Apr/18 16:54 Start Date: 09/Apr/18 16:54 Worklog Time Spent: 10m Work Description: lukecwik commented on a change in pull request #414: [BEAM-3252] Updating contributor's guide to reference Gradle. URL: https://github.com/apache/beam-site/pull/414#discussion_r180160597 ## File path: src/contribute/intellij.md ## @@ -15,6 +15,22 @@ section_menu: section-menu/contribute.html > > Mastering IntelliJ is, ultimately, your responsibility. +## Create a working Gradle module + +1. Create an empty IntelliJ project outside of the Beam source tree. +2. Under Project Structure > Project, select a Project SDK. +3. Under Project Structure > Modules, click the + sign to add a module and select "Import Module". +1. Select the directory containing the Beam source tree. +2. Tick the "Import module from external model" button and select Gradle from the list. +3. Tick the following boxes. + * Use auto-import + * Create separate module per source set + * Store generated project files externally + * Use default gradle wrapper + +This should result in a working Gradle project. Build the project by executing the "build" task in +the root Gradle module. + ## Enable Annotation Processing Review comment: I don't believe we need this whole section. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 89012) Time Spent: 0.5h (was: 20m) > Update contributors guide to discuss Gradle > --- > > Key: BEAM-3252 > URL: https://issues.apache.org/jira/browse/BEAM-3252 > Project: Beam > Issue Type: Sub-task > Components: build-system, website >Reporter: Luke Cwik >Assignee: Daniel Oliveira >Priority: Major > Time Spent: 0.5h > Remaining Estimate: 0h > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-3252) Update contributors guide to discuss Gradle
[ https://issues.apache.org/jira/browse/BEAM-3252?focusedWorklogId=89013=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-89013 ] ASF GitHub Bot logged work on BEAM-3252: Author: ASF GitHub Bot Created on: 09/Apr/18 16:54 Start Date: 09/Apr/18 16:54 Worklog Time Spent: 10m Work Description: lukecwik commented on a change in pull request #414: [BEAM-3252] Updating contributor's guide to reference Gradle. URL: https://github.com/apache/beam-site/pull/414#discussion_r180159041 ## File path: src/contribute/intellij.md ## @@ -15,6 +15,22 @@ section_menu: section-menu/contribute.html > > Mastering IntelliJ is, ultimately, your responsibility. +## Create a working Gradle module + +1. Create an empty IntelliJ project outside of the Beam source tree. +2. Under Project Structure > Project, select a Project SDK. +3. Under Project Structure > Modules, click the + sign to add a module and select "Import Module". +1. Select the directory containing the Beam source tree. +2. Tick the "Import module from external model" button and select Gradle from the list. +3. Tick the following boxes. + * Use auto-import + * Create separate module per source set + * Store generated project files externally + * Use default gradle wrapper + +This should result in a working Gradle project. Build the project by executing the "build" task in Review comment: I believe we should tell users to delegate build/test actions to gradle. We should tell users to do this as well, instructions are here: https://dzone.com/articles/using-idea-to-delegate-build-and-run-actions-to-gr This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 89013) Time Spent: 0.5h (was: 20m) > Update contributors guide to discuss Gradle > --- > > Key: BEAM-3252 > URL: https://issues.apache.org/jira/browse/BEAM-3252 > Project: Beam > Issue Type: Sub-task > Components: build-system, website >Reporter: Luke Cwik >Assignee: Daniel Oliveira >Priority: Major > Time Spent: 0.5h > Remaining Estimate: 0h > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-3252) Update contributors guide to discuss Gradle
[ https://issues.apache.org/jira/browse/BEAM-3252?focusedWorklogId=88559=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-88559 ] ASF GitHub Bot logged work on BEAM-3252: Author: ASF GitHub Bot Created on: 06/Apr/18 18:38 Start Date: 06/Apr/18 18:38 Worklog Time Spent: 10m Work Description: youngoli commented on issue #414: [BEAM-3252] Updating contributor's guide to reference Gradle. URL: https://github.com/apache/beam-site/pull/414#issuecomment-379340670 Note: I was making this PR unaware that @udim was working on an overlapping change in #412. The overlapping changes will probably need to be merged by someone. Also note: This change and other Maven->Gradle changes should probably go in a separate branch so the site doesn't mention Maven in some places and Gradle in others. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 88559) Time Spent: 20m (was: 10m) > Update contributors guide to discuss Gradle > --- > > Key: BEAM-3252 > URL: https://issues.apache.org/jira/browse/BEAM-3252 > Project: Beam > Issue Type: Sub-task > Components: build-system, website >Reporter: Luke Cwik >Assignee: Daniel Oliveira >Priority: Major > Time Spent: 20m > Remaining Estimate: 0h > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-3252) Update contributors guide to discuss Gradle
[ https://issues.apache.org/jira/browse/BEAM-3252?focusedWorklogId=88555=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-88555 ] ASF GitHub Bot logged work on BEAM-3252: Author: ASF GitHub Bot Created on: 06/Apr/18 18:36 Start Date: 06/Apr/18 18:36 Worklog Time Spent: 10m Work Description: youngoli opened a new pull request #414: [BEAM-3252] Updating contributor's guide to reference Gradle. URL: https://github.com/apache/beam-site/pull/414 Removed as many references to maven or pom files under contribute as I could. There's still a few references in the Eclipse Tips file since I have no clue how to use Eclipse with Gradle and have yet to find someone who does. Also references in maturity-model in the dependency tree. It's not really possible to create a Gradle dependency tree that isn't hundreds of thousands of lines though, because each distinct configuration in each project has it's own dependencies so you end up creating hundreds of dependency trees, many of which are hundreds of lines long by themselves. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 88555) Time Spent: 10m Remaining Estimate: 0h > Update contributors guide to discuss Gradle > --- > > Key: BEAM-3252 > URL: https://issues.apache.org/jira/browse/BEAM-3252 > Project: Beam > Issue Type: Sub-task > Components: build-system, website >Reporter: Luke Cwik >Assignee: Daniel Oliveira >Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > -- This message was sent by Atlassian JIRA (v7.6.3#76005)