-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle.kts
69 lines (60 loc) · 1.68 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
plugins {
`java-gradle-plugin`
`kotlin-dsl`
`maven-publish`
}
group = "com.timgroup"
val buildNumber: String? by extra { System.getenv("ORIGINAL_BUILD_NUMBER") ?: System.getenv("BUILD_NUMBER") }
if (buildNumber != null) version = "1.1.${buildNumber}"
repositories {
mavenCentral()
}
gradlePlugin {
plugins {
register("sass") {
id = "com.youdevise.sass"
implementationClass = "com.youdevise.gradle.plugins.SassPlugin"
}
}
}
publishing {
val repoUrl: String by project
val repoUsername: String by project
val repoPassword: String by project
repositories {
maven(url = "${repoUrl}/repositories/yd-release-candidates") {
credentials {
username = repoUsername
password = repoPassword
}
}
}
}
afterEvaluate {
publishing {
publications.named("pluginMaven", MavenPublication::class).configure {
artifact(tasks["sourcesJar"])
}
}
}
tasks.register("sourcesJar", Jar::class) {
dependsOn("classes")
archiveClassifier.set("sources")
from(sourceSets["main"].allSource)
}
dependencies {
implementation(gradleApi())
runtimeOnly("org.jruby:jruby-complete:1.7.27")
runtimeOnly("me.n4u.sass:sass-gems:3.1.16")
testImplementation("junit:junit:4.12")
testImplementation(kotlin("test-junit"))
testImplementation("com.natpryce:hamkrest:1.7.0.0")
}
tasks.withType(JavaCompile::class).configureEach {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
options.encoding = "UTF-8"
options.isIncremental = true
options.isDeprecation = true
options.compilerArgs = listOf("-parameters")
}