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

fix: fix broken Gradle allJars task on generated libs and add tests for it #901

Merged
merged 1 commit into from
Jan 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
mkdir /tmp/java-storage
tar zxvf bazel-bin/test/integration/google-cloud-storage-v2-java.tar.gz -C /tmp/java-storage
pushd /tmp/java-storage/google-cloud-storage-v2-java
./gradlew clean build publishToMavenLocal
./gradlew clean build publishToMavenLocal sourcesJar allJars
popd

- name: Gradle Build Generated Compute Client Library
Expand All @@ -62,7 +62,7 @@ jobs:
bazel --batch build @com_google_googleapis//google/cloud/compute/v1small:google-cloud-compute-small-v1-java
tar zxvf bazel-bin/external/com_google_googleapis/google/cloud/compute/v1small/google-cloud-compute-small-v1-java.tar.gz -C /tmp/java-compute
pushd /tmp/java-compute/google-cloud-compute-small-v1-java
./gradlew clean build publishToMavenLocal
./gradlew clean build publishToMavenLocal sourcesJar allJars
popd

- uses: actions/upload-artifact@v2
Expand Down
4 changes: 2 additions & 2 deletions rules_java_gapic/resources/gradle/client_grpc.gradle.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ clean {
task allJars(type: Copy) {
dependsOn test, jar
into 'all-jars'
// Replace with `from configurations.testRuntimeOnly, jar` to include test dependencies
from configurations.runtimeOnly, jar
// Replace with `from configurations.testRuntimeClasspath, jar` to include test dependencies
from configurations.runtimeClasspath, jar
}
4 changes: 2 additions & 2 deletions rules_java_gapic/resources/gradle/client_grpcrest.gradle.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ clean {
task allJars(type: Copy) {
dependsOn test, jar
into 'all-jars'
// Replace with `from configurations.testRuntimeOnly, jar` to include test dependencies
from configurations.runtimeOnly, jar
// Replace with `from configurations.testRuntimeClasspath, jar` to include test dependencies
from configurations.runtimeClasspath, jar
}
4 changes: 2 additions & 2 deletions rules_java_gapic/resources/gradle/client_rest.gradle.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ clean {
task allJars(type: Copy) {
dependsOn test, jar
into 'all-jars'
// Replace with `from configurations.testRuntimeOnly, jar` to include test dependencies
from configurations.runtimeOnly, jar
// Replace with `from configurations.testRuntimeClasspath, jar` to include test dependencies
from configurations.runtimeClasspath, jar
}