This repository has been archived by the owner on Nov 26, 2022. It is now read-only.
forked from gradle/playframework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
158 lines (136 loc) · 5.58 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
plugins {
groovy
`java-gradle-plugin`
`maven-publish`
org.gradle.playframework.`test-setup`
org.gradle.playframework.`integration-test-fixtures`
org.gradle.playframework.`integration-test`
org.gradle.playframework.`user-guide`
org.gradle.playframework.`github-pages`
org.gradle.playframework.`documentation-test`
id("com.gradle.plugin-publish") version "0.12.0"
id("com.jfrog.bintray") version "1.8.4"
}
group = "org.iatoki"
version = "0.15"
repositories {
jcenter()
maven(url = "https://repo.gradle.org/gradle/libs")
}
dependencies {
testImplementation("org.spockframework:spock-core:1.2-groovy-2.5") {
exclude(group = "org.codehaus.groovy")
}
integTestFixturesImplementation("com.google.guava:guava:23.0")
integTestFixturesImplementation("org.hamcrest:hamcrest-library:1.3")
integTestFixturesImplementation("org.apache.ant:ant:1.9.3")
integTestFixturesImplementation("org.freemarker:freemarker:2.3.30")
docTestImplementation("org.gradle:sample-check:0.7.0")
docTestRuntimeOnly("org.slf4j:slf4j-simple:1.7.16")
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
gradlePlugin {
testSourceSets(sourceSets.integTest.get(), sourceSets.docTest.get())
plugins {
register("play-twirl-plugin") {
id = "org.gradle.playframework-twirl"
displayName = "Play Twirl Plugin"
description = "Plugin for compiling Twirl sources in a Play application."
implementationClass = "org.gradle.playframework.plugins.PlayTwirlPlugin"
}
register("play-routes-plugin") {
id = "org.gradle.playframework-routes"
displayName = "Play Routes Plugin"
description = "Plugin for compiling Play routes sources in a Play application."
implementationClass = "org.gradle.playframework.plugins.PlayRoutesPlugin"
}
register("play-less-plugin") {
id = "org.gradle.playframework-less"
displayName = "Play LESS Plugin"
description = "Plugin for compiling LESS stylesheets in a Play application."
implementationClass = "org.gradle.playframework.plugins.PlayLessPlugin"
}
register("play-webjars-plugin") {
id = "org.gradle.playframework-webjars"
displayName = "Play WebJars Plugin"
description = "Plugin for extracting WebJars in a Play application."
implementationClass = "org.gradle.playframework.plugins.PlayWebJarsPlugin"
}
register("play-application-plugin") {
id = "org.gradle.playframework-application"
displayName = "Play Application Plugin"
description = "Plugin for building a Play application."
implementationClass = "org.gradle.playframework.plugins.PlayApplicationPlugin"
}
register("play-javascript-plugin") {
id = "org.gradle.playframework-javascript"
displayName = "Play JavaScript Plugin"
description = "Plugin for adding JavaScript processing to a Play application."
implementationClass = "org.gradle.playframework.plugins.PlayJavaScriptPlugin"
}
register("play-distribution-plugin") {
id = "org.gradle.playframework-distribution"
displayName = "Play Distribution Plugin"
description = "Plugin for generating distributions for Play applications."
implementationClass = "org.gradle.playframework.plugins.PlayDistributionPlugin"
}
register("play-ide-plugin") {
id = "org.gradle.playframework-ide"
displayName = "Play IDE Plugin"
description = "Plugin for generating IDE project files for Play applications."
implementationClass = "org.gradle.playframework.plugins.PlayIdePlugin"
}
register("play-plugin") {
id = "org.gradle.playframework"
displayName = "Play Plugin"
description = "Plugin that supports building, testing and running Play applications with Gradle."
implementationClass = "org.gradle.playframework.plugins.PlayPlugin"
}
}
}
// Wire in the publishing credentials from the environment or as a project property
setFromEnvOrGradleProperty("gradle.publish.key", "GRADLE_PUBLISH_KEY")
setFromEnvOrGradleProperty("gradle.publish.secret", "GRADLE_PUBLISH_SECRET")
fun Project.setFromEnvOrGradleProperty(gradleProperty: String, environmentVariable: String) {
val envVar = providers.environmentVariable(environmentVariable).forUseAtConfigurationTime()
val gradleProp = providers.gradleProperty(gradleProperty).forUseAtConfigurationTime()
ext[gradleProperty] = envVar.orElse(gradleProp).getOrNull()
}
pluginBundle {
website = "https://gradle.github.io/playframework/"
vcsUrl = "https://github.com/gradle/playframework"
tags = listOf("playframework", "web", "java", "scala")
mavenCoordinates {
groupId = project.group.toString()
artifactId = base.archivesBaseName
}
}
val sourceJar by tasks.creating(Jar::class) {
archiveClassifier.set("sources")
from(sourceSets.getByName("main").allSource)
}
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
artifact(sourceJar)
}
}
}
bintray {
user = System.getenv("BINTRAY_USER")
key = System.getenv("BINTRAY_KEY")
setPublications("maven")
pkg.apply {
repo = "releases"
name = "playframework"
userOrg = "ia-toki"
version.apply {
name = "0.15"
}
}
}