mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-10 20:20:08 +08:00
some modify
This commit is contained in:
parent
412dc0ac13
commit
af48b74786
@ -4,6 +4,7 @@ kotlin.code.style=official
|
|||||||
miraiVersion=0.30.0
|
miraiVersion=0.30.0
|
||||||
miraiConsoleVersion=0.3.7
|
miraiConsoleVersion=0.3.7
|
||||||
miraiConsoleWrapperVersion=0.1.4
|
miraiConsoleWrapperVersion=0.1.4
|
||||||
|
miraiConsoleGraphicalVersion = 0.0.2
|
||||||
kotlin.incremental.multiplatform=true
|
kotlin.incremental.multiplatform=true
|
||||||
kotlin.parallel.tasks.in.project=true
|
kotlin.parallel.tasks.in.project=true
|
||||||
# kotlin
|
# kotlin
|
||||||
|
@ -1,8 +1,13 @@
|
|||||||
|
import Versions.Publishing.bintray
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("kotlinx-serialization")
|
id("kotlinx-serialization")
|
||||||
id("org.openjfx.javafxplugin") version "0.0.8"
|
id("org.openjfx.javafxplugin") version "0.0.8"
|
||||||
id("kotlin")
|
id("kotlin")
|
||||||
id("java")
|
id("java")
|
||||||
|
id("com.jfrog.bintray")
|
||||||
|
`maven-publish`
|
||||||
}
|
}
|
||||||
|
|
||||||
javafx {
|
javafx {
|
||||||
@ -15,12 +20,37 @@ apply(plugin = "com.github.johnrengelman.shadow")
|
|||||||
|
|
||||||
version = Versions.Mirai.console
|
version = Versions.Mirai.console
|
||||||
|
|
||||||
|
/*
|
||||||
tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar>() {
|
tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar>() {
|
||||||
manifest {
|
manifest {
|
||||||
attributes["Main-Class"] = "net.mamoe.mirai.console.graphical.MiraiGraphicalLoader"
|
attributes["Main-Class"] = "net.mamoe.mirai.console.graphical.MiraiGraphicalLoader"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
val miraiConsoleGraphicalVersion: String by project.ext
|
||||||
|
version = miraiConsoleGraphicalVersion
|
||||||
|
|
||||||
|
description = "Console Graphical Version with plugin support for mirai"
|
||||||
|
bintray {
|
||||||
|
val keyProps = Properties()
|
||||||
|
val keyFile = file("../keys.properties")
|
||||||
|
if (keyFile.exists()) keyFile.inputStream().use { keyProps.load(it) }
|
||||||
|
if (keyFile.exists()) keyFile.inputStream().use { keyProps.load(it) }
|
||||||
|
|
||||||
|
user = keyProps.getProperty("bintrayUser")
|
||||||
|
key = keyProps.getProperty("bintrayKey")
|
||||||
|
setPublications("mavenJava")
|
||||||
|
setConfigurations("archives")
|
||||||
|
|
||||||
|
pkg.apply {
|
||||||
|
repo = "mirai"
|
||||||
|
name = "mirai-console-graphical"
|
||||||
|
setLicenses("AGPLv3")
|
||||||
|
publicDownloadNumbers = true
|
||||||
|
vcsUrl = "https://github.com/mamoe/mirai"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
val kotlinVersion: String by rootProject.ext
|
val kotlinVersion: String by rootProject.ext
|
||||||
val atomicFuVersion: String by rootProject.ext
|
val atomicFuVersion: String by rootProject.ext
|
||||||
@ -54,3 +84,38 @@ dependencies {
|
|||||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
|
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
|
||||||
kotlinOptions.jvmTarget = "1.8"
|
kotlinOptions.jvmTarget = "1.8"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("DEPRECATION")
|
||||||
|
val sourcesJar by tasks.registering(Jar::class) {
|
||||||
|
classifier = "sources"
|
||||||
|
from(sourceSets.main.get().allSource)
|
||||||
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
/*
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
// change to point to your repo, e.g. http://my.org/repo
|
||||||
|
url = uri("$buildDir/repo")
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
publications {
|
||||||
|
register("mavenJava", MavenPublication::class) {
|
||||||
|
from(components["java"])
|
||||||
|
|
||||||
|
groupId = rootProject.group.toString()
|
||||||
|
artifactId = "mirai-console-graphical"
|
||||||
|
version = miraiConsoleGraphicalVersion
|
||||||
|
|
||||||
|
pom.withXml {
|
||||||
|
val root = asNode()
|
||||||
|
root.appendNode("description", description)
|
||||||
|
root.appendNode("name", project.name)
|
||||||
|
root.appendNode("url", "https://github.com/mamoe/mirai")
|
||||||
|
root.children().last()
|
||||||
|
}
|
||||||
|
|
||||||
|
artifact(sourcesJar.get())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -21,6 +21,11 @@ internal object ConsoleUpdater {
|
|||||||
"version" to "/net/mamoe/mirai-console/"
|
"version" to "/net/mamoe/mirai-console/"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
put(
|
||||||
|
CONSOLE_GRAPHICAL, mapOf(
|
||||||
|
"version" to "/net/mamoe/mirai-console-graphical/"
|
||||||
|
)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import java.util.*
|
import java.util.*
|
||||||
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm")
|
kotlin("jvm")
|
||||||
@ -28,6 +29,7 @@ dependencies {
|
|||||||
implementation(group = "com.alibaba", name = "fastjson", version = "1.2.62")
|
implementation(group = "com.alibaba", name = "fastjson", version = "1.2.62")
|
||||||
implementation(group = "org.yaml", name = "snakeyaml", version = "1.25")
|
implementation(group = "org.yaml", name = "snakeyaml", version = "1.25")
|
||||||
implementation(group = "com.moandjiezana.toml", name = "toml4j", version = "0.7.2")
|
implementation(group = "com.moandjiezana.toml", name = "toml4j", version = "0.7.2")
|
||||||
|
implementation(kotlin("stdlib-jdk8"))
|
||||||
}
|
}
|
||||||
|
|
||||||
val miraiConsoleVersion: String by project.ext
|
val miraiConsoleVersion: String by project.ext
|
||||||
@ -88,3 +90,15 @@ publishing {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
repositories {
|
||||||
|
maven("https://dl.bintray.com/kotlin/kotlin-eap")
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
val compileKotlin: KotlinCompile by tasks
|
||||||
|
compileKotlin.kotlinOptions {
|
||||||
|
jvmTarget = "1.8"
|
||||||
|
}
|
||||||
|
val compileTestKotlin: KotlinCompile by tasks
|
||||||
|
compileTestKotlin.kotlinOptions {
|
||||||
|
jvmTarget = "1.8"
|
||||||
|
}
|
@ -16,6 +16,8 @@ pluginManagement {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
maven { url "https://plugins.gradle.org/m2/" }
|
maven { url "https://plugins.gradle.org/m2/" }
|
||||||
maven { url "https://dl.bintray.com/jetbrains/kotlin-native-dependencies" }
|
maven { url "https://dl.bintray.com/jetbrains/kotlin-native-dependencies" }
|
||||||
|
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
|
||||||
|
maven { url 'https://plugins.gradle.org/m2/' }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user