mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-27 17:00:14 +08:00
Add mirai.enable.jvmtoolchain.special=false
to disable jvmToolchain
This commit is contained in:
parent
bc8ff18b07
commit
96a772c5ca
@ -156,6 +156,10 @@ private val POSSIBLE_NATIVE_TARGETS by lazy { setOf("mingwX64", "macosX64", "mac
|
||||
|
||||
const val JVM_TOOLCHAIN_VERSION = 8
|
||||
|
||||
val JVM_TOOLCHAIN_ENABLED by projectLazy {
|
||||
rootProject.getLocalProperty("mirai.enable.jvmtoolchain.special", true)
|
||||
}
|
||||
|
||||
/**
|
||||
* ## Android Test 结构
|
||||
*
|
||||
@ -166,7 +170,9 @@ const val JVM_TOOLCHAIN_VERSION = 8
|
||||
*/
|
||||
fun Project.configureJvmTargetsHierarchical(androidNamespace: String) {
|
||||
extensions.getByType(KotlinMultiplatformExtension::class.java).apply {
|
||||
if (JVM_TOOLCHAIN_ENABLED) {
|
||||
jvmToolchain(JVM_TOOLCHAIN_VERSION)
|
||||
}
|
||||
|
||||
val commonMain by sourceSets.getting
|
||||
val commonTest by sourceSets.getting
|
||||
|
@ -163,6 +163,8 @@ projects.module-path.enabled=false
|
||||
projects.mirai-console.enabled=false
|
||||
# 特殊配置,关闭 mirai-logging,这会关闭所有日志转接模块
|
||||
projects.mirai-logging.enabled=false
|
||||
# 特殊配置,是否取消指定 jvmToolchain,在本地 jvmTest 中需要访问 JDK 9+ 的内容时需要携带此配置
|
||||
mirai.enable.jvmtoolchain.special=false
|
||||
```
|
||||
|
||||
通常关闭 IDEA 插件和 Gradle 插件可以显著提高初始化速度(IDEA 插件项目在初始化时需要下载 1G 左右编译依赖)。
|
||||
|
Loading…
Reference in New Issue
Block a user