-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
119 lines (94 loc) · 3.02 KB
/
build.gradle
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
plugins {
id "java"
id "groovy"
id "maven-publish"
id "com.github.node-gradle.node" version "3.4.0"
}
description = "Tapestry Extensions"
group = "de.eddyson"
version = "0.3.0"
def versions = [
slf4j: '1.7.36',
tapestry: '5.8.2',
selenium: '3.141.59'
]
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
}
dependencies {
implementation "org.apache.tapestry:tapestry-core:$versions.tapestry"
implementation "org.slf4j:slf4j-api:$versions.slf4j"
runtimeOnly "com.github.eddyson-de:tapestry-webjars:1.2.0"
//Webjars
runtimeOnly('org.webjars.npm:select2:4.0.13') {
exclude group: 'org.webjars.npm', module: 'almond'
exclude group: 'org.webjars.npm', module: 'jquery-mousewheel'
}
testImplementation "org.apache.tapestry:tapestry-spock:$versions.tapestry"
testImplementation "org.gebish:geb-spock:5.1"
testImplementation "com.github.eddyson-de:tapestry-geb:0.47.0"
testImplementation "org.seleniumhq.selenium:selenium-firefox-driver:$versions.selenium"
testImplementation "org.seleniumhq.selenium:selenium-chrome-driver:$versions.selenium"
testImplementation "io.github.bonigarcia:webdrivermanager:5.2.1"
// Logback
testRuntimeOnly 'ch.qos.logback:logback-classic:1.2.11'
testRuntimeOnly "org.apache.tapestry:tapestry-webresources:$versions.tapestry"
}
test {
useJUnitPlatform()
}
tasks.withType(Test) {
systemProperty "geb.env", System.getProperty("geb.env") ?: 'firefox'
systemProperty "tapestry.service-reloading-enabled", "false"
systemProperty "tapestry.execution-mode", "test"
systemProperty "webappLocation", "src/test/webapp"
systemProperty "jettyPort", 9040
enableAssertions = true
}
node {
download = true
version = "14.20.0"
}
def compiledCoffeeScriptDir = "${project.buildDir}/compiled-coffeescript"
task compileCoffeeScript(type: NpxTask) {
dependsOn npmInstall
command = "coffee"
args = [ "-c", "-o", compiledCoffeeScriptDir, 'src/main/resources/META-INF/modules' ]
inputs.files fileTree(dir: 'src/main/resources/META-INF/modules', include: '**/*.coffee')
outputs.dir compiledCoffeeScriptDir
doFirst {
delete compiledCoffeeScriptDir
}
}
processResources {
dependsOn compileCoffeeScript
}
jar {
manifest { attributes 'Tapestry-Module-Classes': 'de.eddyson.tapestry.extensions.modules.ExtensionsModule' }
rootSpec.exclude 'META-INF/modules/**/*.coffee'
from(compiledCoffeeScriptDir){ into "META-INF/modules" }
}
task sourceJar(type: Jar) {
dependsOn classes
classifier "sources"
from sourceSets.main.allSource
}
publishing {
publications {
maven(MavenPublication) {
from components.java
artifact tasks.sourceJar
}
}
}
task runTestApp(type:JavaExec) {
mainClass = "org.apache.tapestry5.test.JettyRunner"
args "-d", "src/test/webapp/", "-p", "9040"
systemProperty "tapestry.execution-mode", "test"
classpath = configurations.testRuntimeClasspath + sourceSets.test.output + sourceSets.main.output
}