Include mirai-console in mirai project build

This commit is contained in:
Him188 2021-01-28 09:32:22 +08:00
parent 3f92b844cb
commit 4432ae30df
9 changed files with 86 additions and 24 deletions

View File

@ -1,3 +1,12 @@
/*
* Copyright 2019-2021 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
*/
@file:Suppress("UnusedImport") @file:Suppress("UnusedImport")
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
@ -65,4 +74,4 @@ tasks {
} }
} }
setupPublishing("mirai-console") configurePublishing("mirai-console")

View File

@ -0,0 +1,21 @@
/*
* Copyright 2019-2021 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
*/
import org.gradle.api.Project
/*
* For compatibility with composite mirai-core and mirai-console builds and dedicated mirai-console builds.
*
* If you're in mirai project, see also root/buildSrc/MiraiCoreDependency.kt (likely path)
*/
const val `mirai-core-api` = "net.mamoe:mirai-core-api:${Versions.core}"
const val `mirai-core` = "net.mamoe:mirai-core:${Versions.core}"
const val `mirai-core-utils` = "net.mamoe:mirai-core-utils:${Versions.core}"

View File

@ -1,8 +1,8 @@
/* /*
* Copyright 2019-2020 Mamoe Technologies and contributors. * Copyright 2019-2021 Mamoe Technologies and contributors.
* *
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
* Use of this source code is governed by the GNU AFFERO GENERAL PUBLIC LICENSE version 3 license that can be found through the following link. * 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 * https://github.com/mamoe/mirai/blob/master/LICENSE
*/ */
@ -60,7 +60,7 @@ internal fun Project.`publishing`(configure: org.gradle.api.publish.PublishingEx
(this as org.gradle.api.plugins.ExtensionAware).extensions.configure("publishing", configure) (this as org.gradle.api.plugins.ExtensionAware).extensions.configure("publishing", configure)
inline fun Project.setupPublishing( inline fun Project.configurePublishing(
artifactId: String, artifactId: String,
bintrayRepo: String = "mirai", bintrayRepo: String = "mirai",
bintrayPkgName: String = artifactId, bintrayPkgName: String = artifactId,

View File

@ -1,8 +1,8 @@
/* /*
* Copyright 2019-2020 Mamoe Technologies and contributors. * Copyright 2019-2021 Mamoe Technologies and contributors.
* *
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
* Use of this source code is governed by the GNU AFFERO GENERAL PUBLIC LICENSE version 3 license that can be found through the following link. * 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 * https://github.com/mamoe/mirai/blob/master/LICENSE
*/ */
@ -58,10 +58,6 @@ const val `kotlinx-serialization-protobuf` = "org.jetbrains.kotlinx:kotlinx-seri
const val `kotlinx-atomicfu` = "org.jetbrains.kotlinx:atomicfu:${Versions.atomicFU}" const val `kotlinx-atomicfu` = "org.jetbrains.kotlinx:atomicfu:${Versions.atomicFU}"
const val `mirai-core-api` = "net.mamoe:mirai-core-api:${Versions.core}"
const val `mirai-core` = "net.mamoe:mirai-core:${Versions.core}"
const val `mirai-core-utils` = "net.mamoe:mirai-core-utils:${Versions.core}"
const val yamlkt = "net.mamoe.yamlkt:yamlkt:${Versions.yamlkt}" const val yamlkt = "net.mamoe.yamlkt:yamlkt:${Versions.yamlkt}"
const val `jetbrains-annotations` = "org.jetbrains:annotations:19.0.0" const val `jetbrains-annotations` = "org.jetbrains:annotations:19.0.0"

View File

@ -1,3 +1,12 @@
/*
* Copyright 2019-2021 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
*/
plugins { plugins {
kotlin("jvm") kotlin("jvm")
kotlin("plugin.serialization") kotlin("plugin.serialization")
@ -22,6 +31,6 @@ version = Versions.consoleTerminal
description = "Console Terminal CLI frontend for mirai" description = "Console Terminal CLI frontend for mirai"
setupPublishing("mirai-console-terminal", bintrayPkgName = "mirai-console-terminal") configurePublishing("mirai-console-terminal", bintrayPkgName = "mirai-console-terminal")
// endregion // endregion

View File

@ -1,3 +1,12 @@
/*
* Copyright 2019-2021 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
*/
@file:Suppress("UnusedImport") @file:Suppress("UnusedImport")
plugins { plugins {
@ -22,4 +31,4 @@ dependencies {
testRuntimeOnly(`kotlin-compiler`) testRuntimeOnly(`kotlin-compiler`)
} }
setupPublishing("mirai-console-compiler-common") configurePublishing("mirai-console-compiler-common")

View File

@ -1,3 +1,12 @@
/*
* Copyright 2019-2021 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
*/
@file:Suppress("UnusedImport") @file:Suppress("UnusedImport")
plugins { plugins {
@ -87,4 +96,4 @@ tasks {
compileKotlin.dependsOn(fillBuildConstants) compileKotlin.dependsOn(fillBuildConstants)
} }
setupPublishing("mirai-console-gradle") configurePublishing("mirai-console-gradle")

View File

@ -1,8 +1,8 @@
/* /*
* Copyright 2019-2020 Mamoe Technologies and contributors. * Copyright 2019-2021 Mamoe Technologies and contributors.
* *
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
* Use of this source code is governed by the GNU AFFERO GENERAL PUBLIC LICENSE version 3 license that can be found through the following link. * 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 * https://github.com/mamoe/mirai/blob/master/LICENSE
*/ */
@ -10,6 +10,6 @@
package net.mamoe.mirai.console.gradle package net.mamoe.mirai.console.gradle
internal object VersionConstants { internal object VersionConstants {
const val CONSOLE_VERSION = "2.0.0" // value is written here automatically during build const val CONSOLE_VERSION = "2.2.0-dev-4" // value is written here automatically during build
const val CORE_VERSION = "2.0.0" // value is written here automatically during build const val CORE_VERSION = "2.2.0-dev-4" // value is written here automatically during build
} }

View File

@ -1,3 +1,12 @@
/*
* Copyright 2019-2021 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
*/
@file:Suppress("UnusedImport") @file:Suppress("UnusedImport")
plugins { plugins {
@ -66,4 +75,4 @@ dependencies {
compileOnly(files("libs/ide-common.jar")) compileOnly(files("libs/ide-common.jar"))
} }
setupPublishing("mirai-console-intellij") configurePublishing("mirai-console-intellij")