Skip to content

Commit 748387a

Browse files
authored
Merge pull request #11943 from smowton/smowton/admin/java-autobuilder-diagnostic-tests
Java: Add tests for autobuilder-detected diagnostics
2 parents cf659f9 + 560a341 commit 748387a

File tree

81 files changed

+2181
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+2181
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#
2+
# https://help.github.com/articles/dealing-with-line-endings/
3+
#
4+
# These are explicitly windows files and should use crlf
5+
*.bat text eol=crlf
6+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
plugins {
2+
3+
/**
4+
* Use `apply false` in the top-level build.gradle file to add a Gradle
5+
* plugin as a build dependency but not apply it to the current (root)
6+
* project. Don't use `apply false` in sub-projects. For more information,
7+
* see Applying external plugins with same version to subprojects.
8+
*/
9+
10+
id 'com.android.application' version '7.3.1' apply false
11+
id 'com.android.library' version '7.3.1' apply false
12+
id 'org.jetbrains.kotlin.android' version '1.7.20' apply false
13+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"markdownMessage": "An Android build may have failed. Ensure the Code Scanning workflow installs required dependencies, and that the [Gradle and Android SDK versions are compatible](https://developer.android.com/studio/releases/gradle-plugin#updating-gradle). Suspicious output line: ` > Minimum supported Gradle version is 7.4. Current version is 7.3. If using the gradle wrapper, try editing the distributionUrl in <test-root-directory>/gradle/wrapper/gradle-wrapper.properties to gradle-7.4-all.zip`",
3+
"severity": "error",
4+
"source": {
5+
"extractorName": "java",
6+
"id": "java/autobuilder/android-build-failure",
7+
"name": "Android build failure"
8+
},
9+
"visibility": {
10+
"cliSummaryTable": true,
11+
"statusPage": true,
12+
"telemetry": true
13+
}
14+
}
15+
{
16+
"markdownMessage": "An Android build may have failed. Ensure the Code Scanning workflow installs required dependencies, and that the [Gradle and Android SDK versions are compatible](https://developer.android.com/studio/releases/gradle-plugin#updating-gradle). Suspicious output line: `Caused by: java.lang.RuntimeException: Minimum supported Gradle version is 7.4. Current version is 7.3. If using the gradle wrapper, try editing the distributionUrl in <test-root-directory>/gradle/wrapper/gradle-wrapper.properties to gradle-7.4-all.zip`",
17+
"severity": "error",
18+
"source": {
19+
"extractorName": "java",
20+
"id": "java/autobuilder/android-build-failure",
21+
"name": "Android build failure"
22+
},
23+
"visibility": {
24+
"cliSummaryTable": false,
25+
"statusPage": false,
26+
"telemetry": true
27+
}
28+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# We currently have a bug where gradle tests become flaky when executed in parallel
2+
# - sometimes, gradle fails to connect to the gradle daemon.
3+
# Therefore, force this test to run sequentially.
4+
# Additionally, Android SDK on-demand downloading can fail when multiple tests try to download the same SDK in parallel.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

java/ql/integration-tests/all-platforms/java/diagnostics/android-gradle-incompatibility/gradlew

Lines changed: 240 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

java/ql/integration-tests/all-platforms/java/diagnostics/android-gradle-incompatibility/gradlew.bat

Lines changed: 91 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)