-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
56 lines (49 loc) · 1.36 KB
/
build.gradle.kts
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
import java.util.Date
import java.text.SimpleDateFormat
plugins {
kotlin("jvm") version "1.3.72"
id("maven-publish")
application
}
project.properties["groupId"]?.let { group = it }
project.properties["version"]?.let { version = it }
repositories {
jcenter()
}
dependencies {
implementation(kotlin("stdlib-jdk8"))
}
application {
mainClassName = "machine.MainKt"
}
tasks.jar {
manifest {
attributes(
"Implementation-Title" to project.name,
"Implementation-Vendor" to project.group,
"Implementation-Version" to project.version,
"Implementation-Timestamp" to SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssz").format(Date())
)
}
}
publishing {
publications {
create<MavenPublication>("dist") {
groupId = "$group"
artifactId = project.name
version = "${project.version}"
artifact("$buildDir/distributions/${project.name}.tar")
artifact("$buildDir/distributions/${project.name}.zip")
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/prc94/${project.name}")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}