-
Notifications
You must be signed in to change notification settings - Fork 27
/
build.gradle
72 lines (61 loc) · 1.69 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
buildscript {
repositories {
flatDir dirs: "../../jcp/target"
}
dependencies {
classpath "com.igormaznitsa:jcp:$jcp_test_version"
}
}
apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'com.igormaznitsa.jcp'
mainClassName = 'hello.world'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
testImplementation 'junit:junit:4.12'
}
jar {
manifest {
attributes(
'Main-Class': 'com.igormaznitsa.jcp.it.gradle.MainTwo'
)
}
}
preprocess {
sources = sourceSets.main.java.srcDirs
allowWhitespaces = true
eol = '\r\n'
keepAttributes = true
sourceEncoding = 'UTF-8'
targetEncoding = 'UTF-8'
ignoreMissingSources = false
excludeExtensions = ['txt', 'xml']
fileExtensions = ['java']
unknownVarAsFalse = false
dryRun = false
verbose = true
clearTarget = true
careForLastEol = true
keepComments = 'remove_jcp_only'
excludeFolders = ['**/some1', '**/some2']
configFiles = ['./configFile.txt']
keepLines = true
allowWhitespaces = true
preserveIndents = true
dontOverwriteSameContent = false
actionPreprocessorExtension = "com.igormaznitsa.jcp.extension.LogPreprocessorExtension"
vars = ['some.test.global': 'Some Test Global Value']
}
task(changeSourceFolder) {
sourceSets.main.java.srcDirs = [preprocess.target]
}.dependsOn preprocess
compileJava.dependsOn preprocess
gradle.buildFinished {
println("Incoming preprocess files: " + preprocess.incomingFiles.size())
println("Resulted preprocess files: " + preprocess.outcomingFiles.size())
}