This repository has been archived by the owner on Feb 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
93 lines (77 loc) · 2.15 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
buildscript {
}
plugins {
id 'com.palantir.docker' version '0.13.0'
}
ext {
vendor = 'pandorasystems'
homepage = 'http://www.trellisldp.org'
docURL = 'http://www.trellisldp.org/apidocs'
license = 'Apache 2'
}
configure(allprojects) { project ->
apply plugin: 'maven'
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'checkstyle'
apply plugin: 'jacoco'
repositories {
jcenter()
mavenCentral()
mavenLocal()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
}
processResources {
filesNotMatching(["**/*.sh", "**/*.jar", "**/*.yml"]) {
expand(project.properties)
}
}
def dockerResourceDir = "${rootProject.buildDir}/resources/main/docker"
docker {
name "${vendor}/trellisldp"
tags "${version}"
dockerfile file("${dockerResourceDir}/Dockerfile")
files "${dockerResourceDir}/cfg","${dockerResourceDir}/lib"
copySpec.from("${buildDir}/maven").into("${mavenInstallPath}")
pull true
noCache true
}
def homeDir = System.getProperty('user.home')
def mavenLocal = new File(homeDir, ".m2/${mavenInstallPath}")
task copyTask(type: Copy) {
from mavenLocal
into "${rootProject.buildDir}/maven"
}
copyTask.dependsOn install
}
configure(subprojects) { subproject ->
task deleteSubprojectFiles(type: Delete) {
delete "${projectDir}/settings.gradle", "${projectDir}/docs"
}
}
configurations {
buildToolsConfig
}
dependencies {
buildToolsConfig 'org.trellisldp:trellis-build-tools:0.2.0'
}
task processBuildTools(type: Copy) {
from {
configurations.buildToolsConfig.collect {
zipTree(it).matching {
include 'checkstyle/*.xml'
include 'license/*.txt'
}
}
}
into 'build'
}
task submoduleUpdate(type: Exec) {
description = 'Updates and merges submodules'
executable = 'git'
args = ['submodule','update','--remote','--merge']
}
checkstyleMain.dependsOn processBuildTools