-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
71 lines (60 loc) · 1.5 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
plugins {
base
`java-library`
`kotlin-dsl`
`maven-publish`
id("com.gradle.plugin-publish") version "0.11.0"
}
group = "com.github.wumo"
version = "1.0.16"
pluginBundle {
website = "https://github.com/wumo/gradle-javacpp-plugin"
vcsUrl = "https://github.com/wumo/gradle-javacpp-plugin.git"
tags = listOf("javacpp", "kotlin")
}
gradlePlugin {
plugins {
register("JavaCPPPlugin") {
id = "com.github.wumo.javacpp"
displayName = "javacpp"
description = "simplified javacpp plugin"
implementationClass = "JavaCPPPlugin"
}
}
}
val publishPluginFromEnv by tasks.creating {
val setupPublishEnv by tasks.creating {
doLast {
val key = System.getenv("GRADLE_PUBLISH_KEY") ?: error("GRADLE_PUBLISH_KEY not set")
val secret = System.getenv("GRADLE_PUBLISH_SECRET") ?: error("GRADLE_PUBLISH_SECRET not set")
System.setProperty("gradle.publish.key", key)
System.setProperty("gradle.publish.secret", secret)
}
}
dependsOn(setupPublishEnv)
dependsOn(tasks.publishPlugins.get())
tasks.publishPlugins.get().mustRunAfter(setupPublishEnv)
}
repositories {
mavenCentral()
}
dependencies {
implementation("net.lingala.zip4j:zip4j:2.6.0")
}
tasks {
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
}
val kotlinSourcesJar by tasks
publishing {
publications {
create<MavenPublication>("maven") {
from(components["kotlin"])
artifact(kotlinSourcesJar)
}
}
}