-
Notifications
You must be signed in to change notification settings - Fork 21
/
build.gradle
182 lines (154 loc) · 4.53 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
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4"
classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:3.0.3'
}
}
apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'nebula.provided-base'
apply plugin: 'idea'
apply plugin: 'application'
//apply from: 'https://repository-javafx-gradle-plugin.forge.cloudbees.com/snapshot/javafx.plugin'
defaultTasks 'clean', 'jar', 'test'
group = 'com.athaydes.automaton'
version = "1.3.2"
description = 'Automaton is a tool for easily automating GUI tests in JavaFX and Swing'
mainClassName = 'com.athaydes.automaton.Automaton'
sourceCompatibility = 1.7
targetCompatibility = 1.7
def groovyVersion = '2.3.3'
repositories {
mavenLocal()
jcenter()
mavenCentral()
}
dependencies {
compile "org.codehaus.groovy:groovy:${groovyVersion}"
compile "org.codehaus.groovy:groovy-swing:${groovyVersion}"
compile "org.codehaus.groovy:groovy-console:${groovyVersion}"
compile "com.athaydes.automaton:swing-selectors:1.0", {
exclude module: 'groovy-all'
}
compile "org.slf4j:slf4j-api:1.7.21"
compile "org.hamcrest:hamcrest-library:1.3"
compile "junit:junit:4.12"
provided "org.slf4j:slf4j-log4j12:1.7.5"
provided "org.apache.logging.log4j:log4j:2.6.1"
testCompile "com.google.code.tempus-fugit:tempus-fugit:1.1"
testCompile "org.spockframework:spock-core:0.7-groovy-2.0"
testCompile "cglib:cglib-nodep:2.2.2"
}
compileTestJava.enabled = false
test {
forkEvery 1 // JavaFX Stage has to be closed to avoid OS Exception in Linux at end of tests
testLogging.showStandardStreams = true
beforeTest { descriptor ->
logger.lifecycle( "Running test: " + descriptor )
}
}
//jfxJar.enabled = false
def manifestAttributes = [
"Implementation-Title" : "Automaton",
"Implementation-Version": version,
"Description" : description,
"Main-Class" : mainClassName,
"Built-On" : new java.util.Date(),
"Premain-Class" : 'com.athaydes.automaton.cli.AutomatonJavaAgent'
]
jar {
manifest {
attributes( manifestAttributes )
}
}
task uberjar( type: Jar, dependsOn: classes ) {
classifier = 'all-deps'
from files( sourceSets.main.output.classesDir )
from files( sourceSets.main.output.resourcesDir )
from configurations.runtime.asFileTree.files
.findAll { !it.name.endsWith( 'jfxrt.jar' ) }
.collect { zipTree( it ) }
manifest {
attributes( manifestAttributes )
}
}
/* Publishing config */
task javadocJar( type: Jar ) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar( type: Jar ) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar, uberjar
}
// add all the info required by Maven Central to the pom
configure( install.repositories.mavenInstaller ) {
//repository(url: "file://$buildDir")
pom.project {
inceptionYear '2013'
name project.name
packaging 'jar'
description project.description
url 'https://github.com/renatoathaydes/Automaton'
scm {
connection '[email protected]:renatoathaydes/Automaton.git'
developerConnection '[email protected]:renatoathaydes/Automaton.git'
url 'https://github.com/renatoathaydes/Automaton'
}
licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'renatoathaydes'
name 'Renato Athaydes'
email '[email protected]'
}
}
}
}
apply plugin: 'com.jfrog.bintray'
bintray {
//dryRun = true
user = project.hasProperty( "bintrayUserName" ) ? bintrayUserName : null
key = project.hasProperty( "bintrayApiKey" ) ? bintrayApiKey : null
//publications = [ "mavenJava" ]
configurations = [ 'archives' ]
publish = true
pkg {
repo = 'maven'
name = 'automaton'
licenses = [ 'Apache-2.0' ]
desc = 'Automaton: easy tests for Swing and JavaFX applications'
websiteUrl = 'https://github.com/renatoathaydes/Automaton'
issueTrackerUrl = 'https://github.com/renatoathaydes/Automaton/issues'
labels = [ 'groovy', 'swing', 'javafx', 'testing', 'automation' ]
publicDownloadNumbers = true
//noinspection GroovyAssignabilityCheck
version {
name = project.version
vcsTag = project.version
gpg {
sign = true
}
if ( project.hasProperty( 'ossrhUsername' ) && project.hasProperty( 'ossrhPassword' ) ) {
mavenCentralSync {
sync = true
user = project.getProperty( 'ossrhUsername' )
password = project.getProperty( 'ossrhPassword' )
close = '1' // '0' to NOT close
}
}
}
}
}
bintrayUpload.dependsOn build, sourcesJar, uberjar