-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
77 lines (64 loc) · 2.14 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.4.0'
id "maven-publish"
id "com.jfrog.bintray" version "1.8.5"
id 'org.jetbrains.kotlin.plugin.serialization' version '1.4.0'
}
group 'io.github.febb'
version metautils_version + "+build." + file("build.txt").text
archivesBaseName = "metautils"
repositories {
mavenCentral()
}
dependencies {
implementation("org.ow2.asm:asm:8.0.1")
implementation 'org.ow2.asm:asm-tree:8.0.1'
implementation 'org.ow2.asm:asm-util:8.0.1'
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation 'com.squareup:javapoet:1.12.1'
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:1.0.0-RC") // JVM dependency
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9'
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = archivesBaseName
from project.components.java
pom.withXml {
def root = asNode()
root.appendNode('description', 'Metaprogramming Utilities')
root.appendNode('name', 'MetaUtils')
root.appendNode('url', "https://github.com/IntransientMC/MetaUtils-Releases")
}
}
}
}
java {
withSourcesJar()
}
task bumpBuildNumber {
doLast {
file("build.txt") .write((file("build.txt").text.toInteger() + 1).toString())
}
}
tasks.bintrayUpload.dependsOn(bumpBuildNumber)
bintray {
user = project.hasProperty('bintray_user') ? project.property('bintray_user') : ""
key = project.hasProperty('bintray_api_key') ? project.property('bintray_api_key') : ""
publications = ["mavenJava"]
publish = true //[Default: false] Whether version should be auto published after an upload
pkg {
repo = "maven"
userOrg = "febb"
name = "MetaUtils"
licenses = ["mit"]
version {
name = metautils_version
released = new Date()
}
}
}