-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
57 lines (45 loc) · 1.6 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
import org.gradleplugins.tasks.CloneWebsite;
import org.gradleplugins.tasks.Commit;
plugins {
id 'java'
id 'application'
id 'groovy-base'
}
repositories {
// Use jcenter for resolving dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}
dependencies {
// This dependency is used by the application.
implementation 'com.google.guava:guava:28.0-jre'
// Use the latest Groovy version for Spock testing
testImplementation 'org.codehaus.groovy:groovy-all:2.5.7'
// Use the awesome Spock testing and specification framework even with Java
testImplementation 'org.spockframework:spock-core:1.3-groovy-2.5'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'org.jsoup:jsoup:1.11.3'
implementation 'commons-io:commons-io:2.6'
implementation 'com.google.guava:guava:28.1-jre'
}
application {
// Define the main class for the application
mainClassName = 'org.gradleplugins.App'
}
def cloneTask = tasks.register("cloneRepo", CloneWebsite) {
repositoryDirectory = layout.buildDirectory.dir("gh-pages-repository")
repositoryUri = "https://github.com/gradle-plugins/portal-api.git"
}
def commitTask = tasks.register("commitBucket", Commit) {
dependsOn(cloneTask, run)
repositoryDirectory = cloneTask.get().getRepositoryDirectory()
it.getUsername().set(System.getenv("USERNAME"));
it.getPassword().set(System.getenv("PASSWORD"));
}
run {
dependsOn(cloneTask)
args layout.buildDirectory.dir("gh-pages-repository").get().asFile
}
tasks.register("continuousIntegration") {
dependsOn(commitTask)
}