Update versions

This commit is contained in:
Him188 2020-03-24 18:02:19 +08:00
parent b46334f841
commit 45487c7e67
7 changed files with 79 additions and 74 deletions

View File

@ -0,0 +1,7 @@
plugins {
`kotlin-dsl`
}
repositories {
jcenter()
}

View File

@ -0,0 +1,46 @@
import org.gradle.kotlin.dsl.DependencyHandlerScope
/*
* Copyright 2020 Mamoe Technologies and contributors.
*
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
*
* https://github.com/mamoe/mirai/blob/master/LICENSE
*/
object Versions {
object Mirai {
const val core = "0.30.0"
const val console = "0.3.6"
const val consoleWrapper = "0.1.3"
}
object Kotlin {
const val stdlib = "1.4-M1"
const val coroutines = "1.3.5-1.4-M1"
const val atomicFU = "0.14.2-1.4-M1"
const val serialization = "0.20.0-1.4-M1"
const val ktor = "1.3.2-1.4-M1"
const val io = "0.1.16"
const val coroutinesIo = "0.1.16"
const val dokka = "0.10.1"
}
object Android {
const val androidGradlePlugin = "3.5.3"
}
object Publishing {
const val bintray = "1.8.4-jetbrains-3"
}
}
@Suppress("unused")
fun DependencyHandlerScope.kotlinx(id: String, version: String) = "org.jetbrains.kotlinx:kotlinx-$id:$version"
@Suppress("unused")
fun DependencyHandlerScope.ktor(id: String, version: String = Versions.Kotlin.ktor) = "io.ktor:ktor-$id:$version"

View File

@ -1,21 +1,5 @@
# style guide
kotlin.code.style=official
# config
miraiVersion=0.29.1
miraiConsoleVersion=0.3.6
miraiConsoleWrapperVersion=0.1.3
kotlin.incremental.multiplatform=true
kotlin.parallel.tasks.in.project=true
# kotlin
kotlinVersion=1.3.70
# kotlin libraries
serializationVersion=0.20.0
coroutinesVersion=1.3.4
atomicFuVersion=0.14.1
kotlinXIoVersion=0.1.16
coroutinesIoVersion=0.1.16
# utility
ktorVersion=1.3.2
klockVersion=1.7.0
# gradle plugin
protobufJavaVersion=3.10.0
kotlin.parallel.tasks.in.project=true

View File

@ -13,6 +13,8 @@ plugins {
apply(plugin = "com.github.johnrengelman.shadow")
version = Versions.Mirai.console
tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar>() {
manifest {
attributes["Main-Class"] = "net.mamoe.mirai.console.graphical.MiraiGraphicalLoader"

View File

@ -7,6 +7,7 @@ plugins {
apply(plugin = "com.github.johnrengelman.shadow")
version = Versions.Mirai.console
tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar>() {
manifest {

View File

@ -4,18 +4,6 @@ plugins {
apply(plugin = "com.github.johnrengelman.shadow")
val kotlinVersion: String by rootProject.ext
val coroutinesVersion: String by rootProject.ext
val coroutinesIoVersion: String by rootProject.ext
val atomicFuVersion: String by rootProject.ext
val kotlinXIoVersion: String by rootProject.ext
val ktorVersion: String by rootProject.ext
fun kotlinx(id: String, version: String) = "org.jetbrains.kotlinx:kotlinx-$id:$version"
fun ktor(id: String, version: String) = "io.ktor:ktor-$id:$version"
tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar> {
manifest {
attributes["Main-Class"] = "net.mamoe.mirai.console.wrapper.WrapperMain"
@ -23,8 +11,6 @@ tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar> {
}
val miraiVersion: String by rootProject.ext
kotlin {
sourceSets {
all {
@ -36,15 +22,13 @@ kotlin {
}
}
val serializationVersion: String by rootProject.ext
dependencies {
//core && protocol
api(kotlin("stdlib", kotlinVersion))
api(kotlin("serialization", kotlinVersion))
api(kotlin("reflect", kotlinVersion))
api(kotlin("stdlib", Versions.Kotlin.stdlib))
api(kotlin("serialization", Versions.Kotlin.stdlib))
api(kotlin("reflect", Versions.Kotlin.stdlib))
api(kotlinx("coroutines-core-common", coroutinesVersion))
api(kotlinx("coroutines-core", Versions.Kotlin.coroutines))
api(kotlinx("serialization-runtime-common", serializationVersion))
api(kotlinx("serialization-protobuf-common", serializationVersion))
api(kotlinx("io", kotlinXIoVersion))
@ -82,7 +66,6 @@ dependencies {
}
val miraiConsoleWrapperVersion: String by project.ext
version = miraiConsoleWrapperVersion
version = Versions.Mirai.consoleWrapper
description = "Console with plugin support for mirai"

View File

@ -1,33 +1,15 @@
import java.util.*
plugins {
id("kotlinx-serialization")
id("kotlin")
kotlin("jvm")
kotlin("plugin.serialization")
id("java")
`maven-publish`
id("com.jfrog.bintray")
}
apply(plugin = "com.github.johnrengelman.shadow")
val kotlinVersion: String by rootProject.ext
val atomicFuVersion: String by rootProject.ext
val coroutinesVersion: String by rootProject.ext
val kotlinXIoVersion: String by rootProject.ext
val coroutinesIoVersion: String by rootProject.ext
val klockVersion: String by rootProject.ext
val ktorVersion: String by rootProject.ext
val serializationVersion: String by rootProject.ext
fun kotlinx(id: String, version: String) = "org.jetbrains.kotlinx:kotlinx-$id:$version"
fun ktor(id: String, version: String) = "io.ktor:ktor-$id:$version"
val miraiVersion: String by rootProject.ext
kotlin {
sourceSets {
all {
@ -39,8 +21,8 @@ kotlin {
}
}
dependencies {
compileOnly("net.mamoe:mirai-core-jvm:$miraiVersion")
compileOnly("net.mamoe:mirai-core-qqandroid-jvm:$miraiVersion")
compileOnly("net.mamoe:mirai-core-jvm:${Versions.Mirai.core}")
compileOnly("net.mamoe:mirai-core-qqandroid-jvm:${Versions.Mirai.core}")
compileOnly(group = "com.alibaba", name = "fastjson", version = "1.2.62")
@ -48,23 +30,23 @@ dependencies {
compileOnly(group = "com.moandjiezana.toml", name = "toml4j", version = "0.7.2")
compileOnly(kotlin("stdlib", kotlinVersion))
compileOnly(kotlin("serialization", kotlinVersion))
compileOnly(kotlin("reflect", kotlinVersion))
compileOnly(kotlin("stdlib", Versions.Kotlin.stdlib))
compileOnly(kotlin("serialization", Versions.Kotlin.stdlib))
compileOnly(kotlin("reflect", Versions.Kotlin.stdlib))
compileOnly(kotlinx("coroutines-io-jvm", coroutinesIoVersion))
compileOnly(kotlinx("coroutines-core", coroutinesVersion))
compileOnly(kotlinx("serialization-runtime", serializationVersion))
compileOnly("org.jetbrains.kotlinx:atomicfu:$atomicFuVersion")
compileOnly(kotlinx("coroutines-io-jvm", Versions.Kotlin.coroutinesIo))
compileOnly(kotlinx("coroutines-core", Versions.Kotlin.coroutines))
compileOnly(kotlinx("serialization-runtime", Versions.Kotlin.serialization))
compileOnly("org.jetbrains.kotlinx:atomicfu:${Versions.Kotlin.atomicFU}")
compileOnly("org.bouncycastle:bcprov-jdk15on:1.64")
compileOnly(ktor("http-cio", ktorVersion))
compileOnly(ktor("http-jvm", ktorVersion))
compileOnly(ktor("io-jvm", ktorVersion))
compileOnly(ktor("client-core-jvm", ktorVersion))
compileOnly(ktor("client-cio", ktorVersion))
compileOnly(ktor("network", ktorVersion))
compileOnly(ktor("http-cio"))
compileOnly(ktor("http-jvm"))
compileOnly(ktor("io-jvm"))
compileOnly(ktor("client-core-jvm"))
compileOnly(ktor("client-cio"))
compileOnly(ktor("network"))
}
val miraiConsoleVersion: String by project.ext