pluginManagement { resolutionStrategy { eachPlugin { switch (requested.id.id) { case "org.jetbrains.kotlin.multiplatform": useModule("org.jetbrains.kotlin:kotlin-gradle-plugin:${requested.version}"); break case "com.android.library": useModule("com.android.tools.build:gradle:${requested.version}"); break case "com.jfrog.bintray": useModule("com.jfrog.bintray.gradle:gradle-bintray-plugin:${requested.version}") } } } repositories { mavenLocal() jcenter() google() mavenCentral() maven { url "https://plugins.gradle.org/m2/" } maven { url "https://dl.bintray.com/jetbrains/kotlin-native-dependencies" } } } rootProject.name = 'mirai' include(':mirai-core') include(':mirai-console') //include(':mirai-api') include(':mirai-api-http') include(':mirai-demos:mirai-demo-1') include(':mirai-demos:mirai-demo-gentleman') include(':mirai-demos') include(':mirai-demos:mirai-demo-android') def javaVersion = System.getProperty("java.version") if (javaVersion.substring(0, javaVersion.indexOf(".")).toInteger() >= 11) { include(':mirai-debug') } else { println("当前使用的 JDK 版本为 ${System.getProperty("java.version")}, 最低需要 JDK 11 才能引入模块 `:mirai-debug`") } project(':mirai-demos:mirai-demo-1').projectDir = file('mirai-demos/mirai-demo-1') project(':mirai-demos:mirai-demo-gentleman').projectDir = file('mirai-demos/mirai-demo-gentleman') project(':mirai-demos:mirai-demo-android').projectDir = file('mirai-demos/mirai-demo-android') enableFeaturePreview('GRADLE_METADATA')