Files
architectury-plugin/build.gradle
2020-12-08 21:30:52 +08:00

93 lines
2.6 KiB
Groovy

plugins {
id "org.jetbrains.kotlin.jvm" version "1.3.72"
id "com.jfrog.bintray" version "1.8.5"
id "java"
id "idea"
id "eclipse"
id "maven"
id "maven-publish"
}
group "me.shedaniel"
version = "1.2." + (System.getenv("GITHUB_RUN_NUMBER") == null ? (((short) new Random().nextInt()).abs() + 1000).toString() : System.getenv("GITHUB_RUN_NUMBER"))
logger.lifecycle(":building architect plugin v${version}")
sourceCompatibility = targetCompatibility = 1.8
repositories {
jcenter()
maven { url "https://maven.fabricmc.net/" }
maven { url "https://files.minecraftforge.net/maven/" }
maven { url "https://dl.bintray.com/shedaniel/cloth/" }
}
apply plugin: 'java-gradle-plugin'
dependencies {
implementation gradleApi()
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.72"
implementation "org.jetbrains.kotlin:kotlin-reflect:1.3.72"
implementation "me.shedaniel:forgified-fabric-loom:0.5.4"
runtime "me.shedaniel:forgified-fabric-loom:0.5.4"
implementation "net.fabricmc:tiny-remapper:0.3.0.70"
implementation "net.fabricmc:tiny-mappings-parser:0.2.2.14"
implementation "org.ow2.asm:asm:8.0"
implementation "org.ow2.asm:asm-commons:8.0"
implementation "org.ow2.asm:asm-tree:8.0"
implementation "org.ow2.asm:asm-util:8.0"
}
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
gradlePlugin {
plugins {
architect {
id = 'architect-plugin'
implementationClass = 'me.shedaniel.architect.plugin.ArchitectPlugin'
}
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier("sources")
from sourceSets.main.allSource
}
bintray {
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_KEY')
publications = ["MyPublication"]
publish = true
pkg {
repo = "cloth"
name = "architect-plugin"
userOrg = "shedaniel"
licenses = ["MIT"]
version {
name = project.version
vcsTag = project.version
released = new Date()
vcsUrl = 'https://github.com/shedaniel/architect-plugin.git'
}
}
}
publishing {
publications {
MyPublication(MavenPublication) {
groupId 'architect-plugin'
artifactId 'architect-plugin.gradle.plugin'
from components.java
artifact(sourcesJar)
}
}
repositories {
}
}