Skip to content

Conversation

@dnfield
Copy link
Contributor

@dnfield dnfield commented Feb 8, 2020

@blasten

Fixes #50386
Fixes #50480

@dnfield dnfield requested a review from blasten February 8, 2020 00:52
@fluttergithubbot fluttergithubbot added c: contributor-productivity Team-specific productivity, code health, technical debt. tool Affects the "flutter" command-line tool. See also t: labels. labels Feb 8, 2020
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only one I'm not 100% sure about whether we should touch. This affects customers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we split it to another PR? WDYT @blasten?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file isn't really used. I don't think it will break customers as far as I can tell.

Copy link

@blasten blasten Feb 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually. This is used if a developer tries to build the plugin alone using Android Studio. cc @gaaclarke who just had this issue. (#50480)

@dnfield
Copy link
Contributor Author

dnfield commented Feb 8, 2020

We may also want to use -bin instead of -all, as it would save on some download size on CI. But I'd rather do that in a separate PR and change all of them in one go.

@christopherfujino
Copy link
Contributor

gonna wait for the linux tests to pass with the new docker build, but then should approve

RUN mkdir -p "${GRADLE_ROOT}"
ENV GRADLE_ARCHIVE="${GRADLE_ROOT}/gradle.zip"
ENV GRADLE_URL="https://services.gradle.org/distributions/gradle-4.4-bin.zip"
ENV GRADLE_URL="https://services.gradle.org/distributions/gradle-5.6.2-bin.zip"
Copy link

@blasten blasten Feb 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this used for though? Do we have tests that call the global Gradle instead of the gradlew script?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what gradlew will use to download the gradle we actually want.

It would be nice if gradlew was smart enough to realize your system gradle was already the right version, but either way it's easier to just find and replace these if they're all in sync. And the current version definitely has bugs around unicode handling...

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gradlew initializes the download of the Gradle binary based on the distributionUrl from gradle-wrapper.properties.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But gradlew uses gradle to do the download :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IOW, you can't use gradlew if you don't already have gradle installed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Which is why it would be nice if gradlew would somehow just check if your current gradle version is the same as what it's about to download)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gradlew is just a script that initializes gradle-wrapper.jar. The only requirement is to have java installed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh hm. I thought for sure at some point it required gradle of some version to be installed first. I was either wrong or that's changed.

I'm not sure why we need this then.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll get rid of it and see what breaks haha

@jmagman jmagman added the t: gradle "flutter build" and "flutter run" on Android label Feb 8, 2020
@dnfield
Copy link
Contributor Author

dnfield commented Feb 8, 2020

Probably have to sync this to head for the golden failure.

@dnfield
Copy link
Contributor Author

dnfield commented Feb 8, 2020

Is there an introaged golden or something?

Copy link

@blasten blasten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@christopherfujino
Copy link
Contributor

Taking Gradle out of the Dockerfile makes me happy, LGTM.

@dnfield
Copy link
Contributor Author

dnfield commented Feb 10, 2020

I was confusing that you need gradle to initialize the gradle wrapper, but once its initialize dyou don't need it anymore - and we just keep the initialized files checked in.

@christopherfujino
Copy link
Contributor

christopherfujino commented Feb 10, 2020

I was confusing that you need gradle to initialize the gradle wrapper, but once its initialize dyou don't need it anymore - and we just keep the initialized files checked in.

Ah, that makes sense, since I've never had to install Gradle before Flutter.

@dnfield
Copy link
Contributor Author

dnfield commented Feb 10, 2020

@Piinks @yjbanov - do either of you know why the oglden test keeps failing on web for this? These changes can't possibly be impacting it. I've tried triaging the golden a few times, but it seems like no matter what I do it fails again.

@Piinks
Copy link
Contributor

Piinks commented Feb 10, 2020

Hm. It looks like this changed 5 golden files. According to the dashboard, they have all been triaged as positive. Looks like they are all related to shadows, is this expected to change those files?

@dnfield
Copy link
Contributor Author

dnfield commented Feb 10, 2020

No, this is changing gradle wrapper options for Android builds. This should have 0 impact on web, and 0 impact on goldens.

@Piinks
Copy link
Contributor

Piinks commented Feb 10, 2020

It looks like a different one is failing each time...

@dnfield
Copy link
Contributor Author

dnfield commented Feb 10, 2020

My assumption is that something on master has actually changed these and this patch is the first one to catch it, but that may be wrong.

Perhaps I keep facing issues because it's runninginto errors sequentially and failing ont he first one?

@dnfield
Copy link
Contributor Author

dnfield commented Feb 10, 2020

I've been approving them because they seem like minor pixel differences.

@Piinks
Copy link
Contributor

Piinks commented Feb 10, 2020

Now there are 6. For some reason it looks like each re-run has failed a new golden file test. It's only happening on web... maybe @chingjun will have some insight?

@dnfield
Copy link
Contributor Author

dnfield commented Feb 10, 2020

Talked offline and we think we figured it out.

This test is updating the docker image, which may be pulling in a newer version of chrome, which means rendering differences on shadows perhaps.

Unfortunately,t he test I'm running runs in a loop and is failing on the first failure and not executing the rest of the tests, so gold is only letting me triage one by one.

@Piinks
Copy link
Contributor

Piinks commented Feb 10, 2020

Caught up offline, that test runs on a loop through different elevation values. A different one in each run is failing because it is throwing inside of the loop. I'm going to update the test to get it out of a loop.

The cause for the change may be because we are picking up a new version of chrome.

@christopherfujino
Copy link
Contributor

christopherfujino commented Feb 10, 2020

Ahh, Chrome update! I guess the web goldens will be susceptible to this every time our Docker image pulls in a new Chrome version.

@dnfield
Copy link
Contributor Author

dnfield commented Feb 10, 2020

Ok, with the test rewritten so the loop is outside the test I was able to triage all the shadow changes at once. It should pass now.

Copy link
Contributor

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Plan to hotfix this into stable.

@dnfield
Copy link
Contributor Author

dnfield commented Feb 10, 2020

Tree is not red. Merging this.

@dnfield dnfield merged commit ffc8559 into flutter:master Feb 10, 2020
@dnfield dnfield deleted the gradle branch February 10, 2020 22:16
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

c: contributor-productivity Team-specific productivity, code health, technical debt. t: gradle "flutter build" and "flutter run" on Android tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Java Plugin template doesn't compile Upgrade gradle to at least 5.5

7 participants