mirai/mirai-console-graphical/build.gradle.kts

115 lines
3.1 KiB
Plaintext
Raw Normal View History

2020-03-29 15:58:35 +08:00
import java.util.*
plugins {
id("kotlinx-serialization")
2020-03-28 21:12:48 +08:00
id("org.openjfx.javafxplugin") version "0.0.8"
id("kotlin")
id("java")
2020-03-29 15:58:35 +08:00
id("com.jfrog.bintray")
`maven-publish`
}
2020-03-28 17:04:14 +08:00
javafx {
version = "13.0.2"
modules = listOf("javafx.controls")
//mainClassName = "Application"
}
apply(plugin = "com.github.johnrengelman.shadow")
2020-03-24 18:02:19 +08:00
2020-03-29 15:58:35 +08:00
/*
2020-03-05 09:29:13 +08:00
tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar>() {
manifest {
attributes["Main-Class"] = "net.mamoe.mirai.console.graphical.MiraiGraphicalLoader"
}
}
2020-03-29 15:58:35 +08:00
*/
2020-03-29 23:34:25 +08:00
version = Versions.Mirai.consoleGraphical
2020-03-05 09:29:13 +08:00
2020-03-29 15:58:35 +08:00
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"
}
}
2020-03-05 09:29:13 +08:00
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"
dependencies {
2020-03-30 17:27:44 +08:00
compileOnly(project(":mirai-console"))
2020-02-28 20:13:25 +08:00
api(group = "no.tornado", name = "tornadofx", version = "1.7.19")
2020-03-28 17:04:14 +08:00
api(group = "com.jfoenix", name = "jfoenix", version = "9.0.8")
2020-03-17 21:57:39 +08:00
2020-03-30 17:27:44 +08:00
testApi(project(":mirai-console"))
2020-03-17 21:57:39 +08:00
testApi(group = "org.yaml", name = "snakeyaml", version = "1.25")
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
2020-03-05 09:29:13 +08:00
}
2020-03-29 15:58:35 +08:00
@Suppress("DEPRECATION")
val sourcesJar by tasks.registering(Jar::class) {
classifier = "sources"
from(sourceSets.main.get().allSource)
}
2020-03-29 18:14:08 +08:00
2020-03-29 15:58:35 +08:00
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"
2020-03-29 18:14:08 +08:00
version = Versions.Mirai.consoleGraphical
2020-03-29 15:58:35 +08:00
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())
}
}
}