-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
77 lines (66 loc) · 1.94 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
71
72
73
74
75
76
77
plugins {
`java-gradle-plugin`
groovy
`maven-publish`
id("com.gradle.plugin-publish") version "0.11.0"
id("com.timgroup.jarmangit") version "1.1.86"
}
val repoUrl: String? by project
val repoUsername: String? by project
val repoPassword: String? by project
val buildNumber: String? by extra { System.getenv("ORIGINAL_BUILD_NUMBER") ?: System.getenv("BUILD_NUMBER") }
val githubUrl by extra("https://github.com/tim-group/gradle-webpack-plugin")
group = "com.timgroup"
if (buildNumber != null) version = "1.0.$buildNumber"
description = "Build Javascript sources with Webpack and test with Mocha / Jest"
repositories {
mavenCentral()
gradlePluginPortal()
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withSourcesJar()
}
dependencies {
implementation(gradleApi())
implementation(localGroovy())
implementation("com.github.node-gradle:gradle-node-plugin:2.2.0")
testImplementation("junit:junit:4.13")
testImplementation("org.spockframework:spock-core:1.3-groovy-2.5") {
exclude(module = "groovy-all")
}
}
tasks {
"test"(Test::class) {
maxParallelForks = 4
}
}
gradlePlugin {
plugins {
create("webpack") {
id = "com.timgroup.webpack"
implementationClass = "com.timgroup.gradle.webpack.WebpackPlugin"
description = project.description
displayName = "Webpack / Mocha plugin"
}
}
}
pluginBundle {
website = githubUrl
vcsUrl = githubUrl
tags = setOf("webpack", "mocha", "jest", "nodejs")
}
publishing {
repositories {
if (project.hasProperty("repoUrl")) {
maven("$repoUrl/repositories/yd-release-candidates") {
name = "timgroup"
credentials {
username = repoUsername.toString()
password = repoPassword.toString()
}
}
}
}
}