Skip to content

Commit 57ac951

Browse files
committed
Add tests for Java autobuilder errors
1 parent fd1ce5d commit 57ac951

File tree

78 files changed

+1946
-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.

78 files changed

+1946
-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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{"markdownMessage": "It looks like an Android build may have failed. Ensure the Code Scanning workflow installs any dependencies such as the NDK or React Native, and that the Gradle and Android SDK versions being used are compatible. 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 /Users/chris/semmle-code-repo/target/codeql-integration-tests/ql/java/ql/integration-tests/all-platforms/java/diagnostics/android-gradle-incompatibility/gradle/wrapper/gradle-wrapper.properties to gradle-7.4-all.zip`", "severity": "error", "source": {"extractorName": "java", "id": "java/autobuilder/android-build-failure", "name": "Android build failure"}, "visibility": {"cliSummaryTable": true, "statusPage": true, "telemetry": true}}
2+
{"markdownMessage": "It looks like an Android build may have failed. Ensure the Code Scanning workflow installs any dependencies such as the NDK or React Native, and that the Gradle and Android SDK versions being used are compatible. 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 /Users/chris/semmle-code-repo/target/codeql-integration-tests/ql/java/ql/integration-tests/all-platforms/java/diagnostics/android-gradle-incompatibility/gradle/wrapper/gradle-wrapper.properties to gradle-7.4-all.zip`", "severity": "error", "source": {"extractorName": "java", "id": "java/autobuilder/android-build-failure", "name": "Android build failure"}, "visibility": {"cliSummaryTable": false, "statusPage": false, "telemetry": true}}
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)