github workflow: switch to JDK 11
Since Android Gradle plugin was updated, it now requires JDK 11. Fixes: > Could not resolve all files for configuration ':classpath'. > Could not resolve com.android.tools.build:gradle:7.4.0. Required by: project : > No matching variant of com.android.tools.build:gradle:7.4.0 was found. The consumer was configured to find a runtime of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.6' but: - Variant 'apiElements' capability com.android.tools.build:gradle:7.4.0 declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares an API of a component compatible with Java 11 and the consumer needed a runtime of a component compatible with Java 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.6')
This commit is contained in:
19
.github/workflows/build.yml
vendored
19
.github/workflows/build.yml
vendored
@@ -49,11 +49,10 @@ jobs:
|
||||
# If using the github runner 'macos-10.15'
|
||||
# $VM_ASSETS/select-xamarin-sdk-v2.sh --mono=6.12 --android=11.2
|
||||
|
||||
- name: Switch to JDK-8
|
||||
if: ${{ false }} # Not needed, we stay with the default installed JDK
|
||||
- name: Switch to JDK-11
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '8'
|
||||
java-version: '11'
|
||||
distribution: 'temurin'
|
||||
|
||||
- name: Display java version
|
||||
@@ -177,11 +176,10 @@ jobs:
|
||||
sudo apt install -y ./xamarin.android-oss/*.deb &&
|
||||
echo "$HOME/xamarin.android-oss/bin/Release/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Switch to JDK-8
|
||||
if: ${{ false }} # Not needed, we stay with the default installed JDK
|
||||
- name: Switch to JDK-11
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '8'
|
||||
java-version: '11'
|
||||
distribution: 'temurin'
|
||||
|
||||
- name: Display java version
|
||||
@@ -279,6 +277,15 @@ jobs:
|
||||
# If we want to also have nmake, use this instead
|
||||
#uses: ilammy/msvc-dev-cmd@v1
|
||||
|
||||
- name: Switch to JDK-11
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '11'
|
||||
distribution: 'temurin'
|
||||
|
||||
- name: Display java version
|
||||
run: java -version
|
||||
|
||||
# Some components of Keepass2Android currently target android API 26 which are not available on the runner
|
||||
- name: Download android-26 API
|
||||
shell: cmd
|
||||
|
Reference in New Issue
Block a user