mirror of
https://github.com/mamoe/mirai.git
synced 2024-12-27 00:50:11 +08:00
Upgrade buildscript for Kotlin 1.6.0, use Gradle 7.2
This commit is contained in:
parent
26c099798b
commit
5368e6b809
@ -51,8 +51,8 @@ dependencies {
|
||||
|
||||
api("com.github.jengelman.gradle.plugins", "shadow", version("shadow"))
|
||||
api("org.jetbrains.kotlin", "kotlin-gradle-plugin", version("kotlinCompiler"))
|
||||
api("org.jetbrains.kotlin", "kotlin-compiler-embeddable", version("kotlinCompiler"))
|
||||
api(ktor("client-okhttp", "1.4.3"))
|
||||
// api("org.jetbrains.kotlin", "kotlin-compiler-embeddable", version("kotlinCompiler"))
|
||||
// api(ktor("client-okhttp", "1.4.3"))
|
||||
api("com.android.tools.build", "gradle", version("androidGradlePlugin"))
|
||||
api(asm("tree"))
|
||||
api(asm("util"))
|
||||
|
@ -38,7 +38,7 @@ fun Project.configureRemoteRepos() {
|
||||
// sonatype
|
||||
val keys = SecretKeys.getCache(project)
|
||||
repositories {
|
||||
if (System.getenv("MIRAI_IS_SNAPSHOTS_PUBLISHING").toBoolean()) {
|
||||
if (System.getenv("MIRAI_IS_SNAPSHOTS_PUBLISHING")?.toBoolean() == true) {
|
||||
maven {
|
||||
name = "MiraiRepo"
|
||||
setUrl(System.getenv("SNAPSHOTS_PUBLISHING_URL"))
|
||||
|
@ -32,7 +32,7 @@ fun Project.configureJvmTarget() {
|
||||
val defaultVer = JavaVersion.VERSION_1_8
|
||||
|
||||
tasks.withType(KotlinJvmCompile::class.java) {
|
||||
kotlinOptions.languageVersion = "1.5"
|
||||
kotlinOptions.languageVersion = "1.6"
|
||||
kotlinOptions.jvmTarget = defaultVer.toString()
|
||||
kotlinOptions.freeCompilerArgs += "-Xjvm-default=all"
|
||||
}
|
||||
@ -151,7 +151,7 @@ val experimentalAnnotations = arrayOf(
|
||||
"net.mamoe.mirai.console.util.ConsoleInternalApi",
|
||||
"net.mamoe.mirai.console.util.ConsoleExperimentalApi",
|
||||
|
||||
"kotlinx.io.core.internal.DangerousInternalIoApi",
|
||||
"kotlinx.io.core.internal.DangerousInternalIoApi"
|
||||
)
|
||||
|
||||
fun Project.configureKotlinExperimentalUsages() {
|
||||
|
@ -20,21 +20,21 @@ object Versions {
|
||||
const val console = project
|
||||
const val consoleTerminal = project
|
||||
|
||||
const val kotlinCompiler = "1.5.30"
|
||||
const val kotlinStdlib = "1.5.30"
|
||||
const val kotlinCompiler = "1.6.0"
|
||||
const val kotlinStdlib = kotlinCompiler
|
||||
const val dokka = "1.6.0"
|
||||
|
||||
const val coroutines = "1.5.1"
|
||||
const val atomicFU = "0.16.3"
|
||||
const val coroutines = "1.6.0"
|
||||
const val atomicFU = "0.17.0"
|
||||
const val serialization = "1.2.2"
|
||||
const val ktor = "1.5.4"
|
||||
const val ktor = "1.6.5"
|
||||
|
||||
const val binaryValidator = "0.4.0"
|
||||
|
||||
const val io = "0.1.16"
|
||||
const val coroutinesIo = "0.1.16"
|
||||
|
||||
const val blockingBridge = "1.10.6-1530.2"
|
||||
const val blockingBridge = "1.10.6-160.1"
|
||||
|
||||
const val androidGradlePlugin = "4.1.1"
|
||||
const val android = "4.1.1.4"
|
||||
@ -54,9 +54,9 @@ object Versions {
|
||||
// If you the versions below, you need to sync changes to mirai-console/buildSrc/src/main/kotlin/Versions.kt
|
||||
|
||||
const val yamlkt = "0.10.2"
|
||||
const val intellijGradlePlugin = "1.1"
|
||||
const val kotlinIntellijPlugin = "211-1.5.20-release-284-IJ7442.40" // keep to newest as kotlinCompiler
|
||||
const val intellij = "2021.1.3" // don't update easily unless you want your disk space -= 500MB
|
||||
const val intellijGradlePlugin = "1.3.0"
|
||||
// const val kotlinIntellijPlugin = "211-1.5.20-release-284-IJ7442.40" // keep to newest as kotlinCompiler
|
||||
const val intellij = "2021.3" // don't update easily unless you want your disk space -= 500MB
|
||||
|
||||
}
|
||||
|
||||
|
@ -6,13 +6,11 @@
|
||||
#
|
||||
# https://github.com/mamoe/mirai/blob/master/LICENSE
|
||||
#
|
||||
|
||||
# style guide
|
||||
kotlin.code.style=official
|
||||
# config
|
||||
kotlin.incremental.multiplatform=true
|
||||
kotlin.parallel.tasks.in.project=true
|
||||
org.gradle.jvmargs=-Xmx4096m -Dfile.encoding=UTF-8
|
||||
org.gradle.jvmargs=-Xmx4096m -Dfile.encoding=UTF-8 --illegal-access=permit -Dkotlin.daemon.jvm.options=--illegal-access=permit --add-opens java.base/java.util=ALL-UNNAMED
|
||||
org.gradle.parallel=true
|
||||
org.gradle.vfs.watch=true
|
||||
kotlin.mpp.enableGranularSourceSetsMetadata=true
|
||||
@ -22,5 +20,5 @@ systemProp.org.gradle.internal.publish.checksums.insecure=true
|
||||
gnsp.disableApplyOnlyOnRootProjectEnforcement=true
|
||||
# We may target 15 with Kotlin 1.5 IR
|
||||
mirai.android.target.api.level=24
|
||||
|
||||
# Enable if you want to use mavenLocal for both Gradle plugin and project dependencies resolutions.
|
||||
systemProp.use.maven.local=false
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -6,7 +6,7 @@
|
||||
#
|
||||
# https://github.com/mamoe/mirai/blob/master/LICENSE
|
||||
#
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
|
@ -25,6 +25,6 @@ dependencies {
|
||||
api(project(":mirai-core-utils"))
|
||||
}
|
||||
|
||||
if (!System.getenv("MIRAI_IS_SNAPSHOTS_PUBLISHING").toBoolean()) {
|
||||
if (System.getenv("MIRAI_IS_SNAPSHOTS_PUBLISHING")?.toBoolean() != true) {
|
||||
configurePublishing("mirai-core-all")
|
||||
}
|
@ -12,7 +12,6 @@ pluginManagement {
|
||||
if (System.getProperty("use.maven.local") == "true") {
|
||||
mavenLocal()
|
||||
}
|
||||
// mavenLocal()
|
||||
gradlePluginPortal()
|
||||
mavenCentral()
|
||||
google()
|
||||
|
Loading…
Reference in New Issue
Block a user