plugin-yml/build.gradle.kts

73 lines
1.8 KiB
Text
Raw Normal View History

2017-09-27 18:19:16 +00:00
import org.gradle.api.tasks.bundling.Jar
plugins {
`java-gradle-plugin`
`kotlin-dsl`
`maven-publish`
2017-09-28 17:35:20 +00:00
id("com.gradle.plugin-publish") version "0.9.8"
2017-09-27 18:19:16 +00:00
id("net.minecrell.licenser") version "0.3"
}
2017-09-28 17:35:20 +00:00
val url: String by extra
2017-09-27 18:19:16 +00:00
repositories {
jcenter()
}
dependencies {
compile("com.fasterxml.jackson.module:jackson-module-kotlin:2.9.1") {
exclude(group = "org.jetbrains.kotlin")
}
compile("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.9.1")
}
var sourceJar = task<Jar>("sourceJar") {
classifier = "sources"
from(java.sourceSets["main"].allSource)
}
artifacts.add("archives", sourceJar)
gradlePlugin {
(plugins) {
"bukkit" {
id = "net.minecrell.plugin-yml.bukkit"
implementationClass = "net.minecrell.pluginyml.bukkit.BukkitPlugin"
}
"bungee" {
id = "net.minecrell.plugin-yml.bungee"
implementationClass = "net.minecrell.pluginyml.bungee.BungeePlugin"
}
}
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
artifact(sourceJar)
}
}
}
2017-09-28 17:35:20 +00:00
pluginBundle {
website = url
vcsUrl = url
description = project.description
tags = listOf("bukkit", "bungee")
(plugins) {
"bukkit" {
id = "net.minecrell.plugin-yml.bukkit"
displayName = "plugin-yml (Bukkit)"
}
"bungee" {
id = "net.minecrell.plugin-yml.bungee"
displayName = "plugin-yml (Bungee)"
}
}
}
2017-09-27 18:19:16 +00:00
// Workaround for https://github.com/gradle/kotlin-dsl/issues/509
configurations.compile.run { setExtendsFrom(extendsFrom.minus<Configuration>(configurations.embeddedKotlin)) }
configurations.compileOnly.extendsFrom(configurations.embeddedKotlin)