diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fddf7f476..2bf432b22 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,46 +3,20 @@ name: Build on: [ push, pull_request ] jobs: - build-mirai-core: + build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: 1.8 - - - name: chmod -R 777 * - run: chmod -R 777 * - - - name: Init gradle project - run: ./gradlew clean --scan - - - name: Build mirai-core series - run: ./gradlew assemble --scan - - - name: mirai-core Tests - run: > - ./gradlew check --scan - -Dmirai.network.show.all.components=true - -Dkotlinx.coroutines.debug=on - -Dmirai.network.show.packet.details=true - build-all: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - name: Checkout submodules run: git submodule update --init --recursive - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 + - name: Setup JDK 11 + uses: actions/setup-java@v2 with: - java-version: 1.8 + distribution: 'adopt' + java-version: '11' - name: chmod -R 777 * run: chmod -R 777 * diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 3e319c8ad..1633a3979 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -13,13 +13,11 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 - - name: Checkout submodules - run: git submodule update --init --recursive - - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 + - name: Setup JDK 11 + uses: actions/setup-java@v2 with: - java-version: 1.8 + distribution: 'adopt' + java-version: '11' - name: chmod -R 777 * run: chmod -R 777 * diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 462b8aa17..04e6f2c79 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,10 +15,11 @@ jobs: - name: Checkout submodules run: git submodule update --init --recursive - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 + - name: Setup JDK 11 + uses: actions/setup-java@v2 with: - java-version: 1.8 + distribution: 'adopt' + java-version: '11' - name: chmod -R 777 * run: chmod -R 777 * diff --git a/buildSrc/src/main/kotlin/ProjectConfigure.kt b/buildSrc/src/main/kotlin/ProjectConfigure.kt index 9e189be89..10c107e32 100644 --- a/buildSrc/src/main/kotlin/ProjectConfigure.kt +++ b/buildSrc/src/main/kotlin/ProjectConfigure.kt @@ -46,6 +46,11 @@ fun Project.configureJvmTarget() { extensions.findByType(JavaPluginExtension::class.java)?.run { sourceCompatibility = defaultVer targetCompatibility = defaultVer + + if (project.path.endsWith("mirai-console-intellij")) { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } } kotlinTargets.orEmpty().filterIsInstance<KotlinJvmTarget>().forEach { target ->