-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
68 lines (59 loc) · 2.08 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
import org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention
import org.jfrog.gradle.plugin.artifactory.dsl.DoubleDelegateWrapper
import org.jfrog.gradle.plugin.artifactory.dsl.PublisherConfig
import org.jfrog.gradle.plugin.artifactory.task.ArtifactoryTask
plugins {
base
id("com.jfrog.artifactory") version Versions.artifactoryPlugin apply false
}
subprojects {
group = "de.cispa.se.tribble"
apply(plugin = "org.gradle.scala")
apply(plugin = "org.gradle.maven-publish")
apply(plugin = "com.jfrog.artifactory")
repositories {
mavenCentral()
}
dependencies{
"implementation"("org.scala-lang:scala-library:${Versions.scala}")
}
tasks.withType<ScalaCompile> {
scalaCompileOptions.encoding = "UTF-8"
scalaCompileOptions.isDeprecation = true
scalaCompileOptions.isUnchecked = true
}
the<JavaPluginExtension>().apply {
targetCompatibility = JavaVersion.VERSION_11
withSourcesJar()
withJavadocJar()
}
the<ArtifactoryPluginConvention>().apply {
setContextUrl(System.getenv("artifactory_context_url"))
publish(delegateClosureOf<PublisherConfig> {
setPublishIvy(false)
repository(delegateClosureOf<DoubleDelegateWrapper> {
setProperty("repoKey", "libs-release-local")
setProperty("username", System.getenv("artifactory_user"))
setProperty("password", System.getenv("artifactory_password"))
setProperty("maven", true)
})
defaults(delegateClosureOf<ArtifactoryTask> {
publications("mavenJava")
})
})
}
tasks.named("artifactoryPublish") {
dependsOn("build")
}
}
// the tribble-tool project will set up its fat jar publishing itself
configure(subprojects.filter { it.name != "tribble-tool" }) {
the<PublishingExtension>().apply {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
fillPomMetadata()
}
}
}
}