fishy commented on code in PR #3022:
URL: https://github.com/apache/thrift/pull/3022#discussion_r1719011713
##########
.github/workflows/build.yml:
##########
@@ -209,24 +209,21 @@ jobs:
sudo apt-get install -y --no-install-recommends $BUILD_DEPS
sudo apt-get install -y wget unzip ant maven
- - name: Setup gradle
+ - name: Setup gradle wrapper
run: |
- wget
https://services.gradle.org/distributions/gradle-$GRADLE_VERSION-bin.zip -q -O
/tmp/gradle-$GRADLE_VERSION-bin.zip
- (echo
"3e1af3ae886920c3ac87f7a91f816c0c7c436f276a6eefdb3da152100fef72ae
/tmp/gradle-$GRADLE_VERSION-bin.zip" | sha256sum -c -)
- unzip -d /tmp /tmp/gradle-$GRADLE_VERSION-bin.zip
- sudo mv /tmp/gradle-$GRADLE_VERSION /usr/local/gradle
- sudo ln -s /usr/local/gradle/bin/gradle /usr/local/bin
- gradle --version
+ cd lib/java
+ gradle wrapper --gradle-version $GRADLE_VERSION
Review Comment:
hmm this would require `gradle` to be already in `$PATH` at this point,
right? I guess that's handled by `actions/setup-java@v4` above, as the this
step passes? I wonder how this is handled/expected from developers' computers.
##########
.github/workflows/build.yml:
##########
@@ -209,24 +209,21 @@ jobs:
sudo apt-get install -y --no-install-recommends $BUILD_DEPS
sudo apt-get install -y wget unzip ant maven
- - name: Setup gradle
+ - name: Setup gradle wrapper
run: |
- wget
https://services.gradle.org/distributions/gradle-$GRADLE_VERSION-bin.zip -q -O
/tmp/gradle-$GRADLE_VERSION-bin.zip
- (echo
"3e1af3ae886920c3ac87f7a91f816c0c7c436f276a6eefdb3da152100fef72ae
/tmp/gradle-$GRADLE_VERSION-bin.zip" | sha256sum -c -)
- unzip -d /tmp /tmp/gradle-$GRADLE_VERSION-bin.zip
- sudo mv /tmp/gradle-$GRADLE_VERSION /usr/local/gradle
- sudo ln -s /usr/local/gradle/bin/gradle /usr/local/bin
- gradle --version
+ cd lib/java
+ gradle wrapper --gradle-version $GRADLE_VERSION
+ ./gradlew --version
Review Comment:
disclaimer: I don't really understand gradle much, but I think the `gradle
wrapper ...` step above generates `./gradlew` script that's used in this step,
is that correct?
can we do that locally and commit `gradlew` into git instead? that seems to
be the way android studio generating android projects.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]