Skip to content
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

Update gradlew to 6.2.2 #966

Merged
merged 1 commit into from Mar 14, 2020
Merged

Update gradlew to 6.2.2 #966

merged 1 commit into from Mar 14, 2020

Conversation

@Scottmitch
Copy link
Member

Scottmitch commented Mar 12, 2020

Motivation:
Update to the latest version of gradlew and update dependencies.

Modifications:

  • Use spotbugs 4.0.2 plugin and 4.0.0 executable
  • Remove explicit guava compile dependency

Result:
Project now uses gradlew 6.2.2.

Motivation:
Update to the latest version of gradlew and update dependencies.

Modifications:
- Use spotbugs 4.0.2 plugin and 4.0.0 executable
- Remove explicit guava compile dependency

Result:
Project now uses gradlew 6.2.2.
@Scottmitch Scottmitch requested review from ddossot and idelpivnitskiy Mar 12, 2020
Copy link
Member

idelpivnitskiy left a comment

Everything works great! 🏅

Went through the same checklist that I did for Gradle 5.x upgrade: #756 (review)

./gradlew clean cleanIdea cleanIdeaWorkspace cleanIdeaProject
./gradlew idea
./gradlew build
./gradlew check
./gradlew test
./gradlew checkstyle
./gradlew spotbugs
./gradlew pmd
./gradlew quality
./gradlew publishToMavenLocal
./gradlew dependencies
./gradlew task [--all]
./gradlew assemble
./gradlew javadocAll
./gradlew validateLocalDocSite

Integration with Intellij IDEA
Gradle pluging in Intellij IDEA

Structure of published .pom and .module files

Changes in testFixtures are visible for other modules
Checktyle rules work
Copyright check works
--include-build ../servicetalk works


The only think I found is that docs/generation project is still using Gradle 5.6.4. I tried to upgrade it to 6.2.2 locally but unfortunately, the plugin we use there does not support Gradle 6 😢: https://github.com/srs/gradle-node-plugin/releases
We can upgrade docs/generation project later, as a follow-up.

@@ -31,10 +31,6 @@ apply plugin: "java-gradle-plugin"
apply from: "../servicetalk-grpc-gradle-plugin/plugin-config.gradle"
apply from: "../servicetalk-gradle-plugin-internal/plugin-config.gradle"

dependencies {
compile "com.google.guava:guava:28.1-jre" // needed because of conflicts between Spotbugs and Protobuf

This comment has been minimized.

Copy link
@idelpivnitskiy
@Scottmitch Scottmitch merged commit 154842a into apple:master Mar 14, 2020
3 checks passed
3 checks passed
pull request validation (jdk11) Build finished.
Details
pull request validation (jdk8) Build finished.
Details
pull request validation (quality) Build finished.
Details
@Scottmitch Scottmitch deleted the Scottmitch:gradle_6 branch Mar 14, 2020
@volyx

This comment has been minimized.

Copy link
Contributor

volyx commented Mar 14, 2020

I'm confused with "Integration with Intellij IDEA ". Is it possible to run test with Intellij IDEA?

Now I'm running test with

CI=true ./gradlew :servicetalk-http-router-predicate:test --tests HttpPredicateRouterBuilderTest

I have tried two ways of importing project to IDEA:

  • with servicetalk.ipr(Skip gradle import)
  • Import as gradle project

With two this approaches I can't run test through IDEA UI. I'm doing something wrong, aren't I? Could you help me please to find proper way to configure IDEA project

After open servicetalk.ipr IDEA asks about gradle. Should I import project as ipr or gradle?

image

IntelliJ IDEA 2019.3.3 (Community Edition)

IntelliJ IDEA 2019.3.3 (Community Edition)
Build #IC-193.6494.35, built on February 11, 2020
Runtime version: 11.0.5+10-b520.38 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.5
GC: ParNew, ConcurrentMarkSweep
Memory: 990M
Cores: 4
Registry:
Non-Bundled Plugins: CheckStyle-IDEA, Dart, FindBugs-IDEA, com.azoft.json2dart, com.karateca.jstoolbox, com.zxk.plugin.buildjson, ideanginx9, io.flutter, io.protostuff.protostuff-jetbrains-plugin, mobi.hsz.idea.gitignore, name.kropp.intellij.makefile, ru.adelf.idea.dotenv

Java version java -version java version "1.8.0_141" Java(TM) SE Runtime Environment (build 1.8.0_141-b15) Java HotSpot(TM) 64-Bit Server VM (build 25.141-b15, mixed mode)
@idelpivnitskiy

This comment has been minimized.

Copy link
Member

idelpivnitskiy commented Mar 14, 2020

@volyx What I did during the latest testing:

  1. ./gradlew clean cleanIdea cleanIdeaWorkspace cleanIdeaProject
  2. ./gradlew idea
  3. open servicetalk.ipr

Then IDE asks to import Gradle Project (as you show on the picture). Personally, I prefer to skip the gradle import for servicetalk because I saw different random glitches when you import large multi-module projects (especially with multiple source sets, like main/test/testFixtures). If I skip the import, every time I run a test in Intellij IDEA, the IDE runs it. I do not run all tests via Intellij IDEA. Usually run only a single test, or a single test class, or a single test package. All debugging features and break-points work in this mode. If I need to run all tests, I use command line: ./gradlew build. All of these are just personal preferences and habits.

For this test I also tried to import the gradle project. Just to verify that it works. I tested that gradle /ide can resolve all dependencies, update them if I change build.gradle on the fly (if you do not import gradle project, you have to run ./gradlew idea manually every time you change build.gradle files to see new depdencies in Intellij IDEA), and run tests. I saw that after gradle import intellij idea runs tests via gradlew (even individual tests), not via standard junit test configuration.

Tested with Intellij IDEA 2019.3.3 (Community Edition). Build #IC-193.6494.35.

@volyx

This comment has been minimized.

Copy link
Contributor

volyx commented Mar 15, 2020

@idelpivnitskiy Steps ./gradlew clean cleanIdea cleanIdeaWorkspace cleanIdeaProject and skip the gradle help! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.