forked from TheBoegl/shadow-log4j-transformer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
138 lines (113 loc) · 3.56 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
plugins {
id "com.gradle.plugin-publish" version "0.9.9"
id "com.jfrog.bintray" version "1.8.0"
id "nu.studer.plugindev" version "1.0.6"
id 'groovy'
id 'eclipse'
id 'idea'
id 'maven-publish'
id 'java-gradle-plugin'
}
// Write the plugin's classpath to a file to share with the tests.
task createClasspathManifest {
def outputDir = file("$buildDir/$name")
inputs.files sourceSets.main.runtimeClasspath
outputs.dir outputDir
doLast {
outputDir.mkdirs()
file("$outputDir/plugin-classpath.txt").text = sourceSets.main.runtimeClasspath.join("\n")
}
}
repositories {
mavenCentral()
}
group 'de.sebastianboegl.gradle.plugins'
// no real semantic versioning (the MAJOR version number correspond to the MAJOR shadow plugin version number)
version "${majorShadowVersion}.2.0"
def shadowVersions = [
'1': '1.2.3',
'2': '2.0.0',
'4': '4.0.0'
]
def shadowVersion = shadowVersions[majorShadowVersion]
dependencies {
compile gradleApi()
compile localGroovy()
compile(group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.10.0')
compile "com.github.jengelman.gradle.plugins:shadow:${shadowVersion}"
testCompile gradleTestKit()
testCompile ('org.spockframework:spock-core:1.0-groovy-2.4') {
exclude module: 'junit-dep'
exclude module: 'groovy-all'
}
// Add the classpath file to the test runtime classpath.
testRuntime files(createClasspathManifest)
}
configurations.all {
resolutionStrategy {
force 'org.codehaus.groovy:groovy-all:2.4.4'
}
}
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
idea {
project {
languageLevel = '1.7'
}
}
plugindev {
pluginId 'de.sebastianboegl.shadow.transformer.log4j'
pluginName 'shadow-log4j-transformer'
pluginImplementationClass 'de.sebastianboegl.gradle.plugins.Log4jTransformerPlugin'
pluginDescription 'A shadow transformer implementation for log4j to concatenate Log4j2Plugins.dat files.'
pluginLicenses 'Apache-2.0'
pluginTags 'gradle', 'shadow', 'transformer', 'log4j', 'log4j2'
authorId 'theboegl'
authorName 'Sebastian Bögl'
authorEmail 'info@sebastianboegl.de'
projectUrl 'https://github.com/TheBoegl/shadow-log4j-transformer'
projectInceptionYear '2017'
done() // do not omit this
}
pluginBundle {
website = 'https://github.com/TheBoegl/shadow-log4j-transformer'
vcsUrl = 'https://github.com/TheBoegl/shadow-log4j-transformer'
description = 'A shadow transformer implementation for log4j to concatenate Log4j2Plugins.dat files.'
tags = ['shadow', 'transformer', 'log4j', 'log4j2']
plugins {
log4jShadowTransformer {
id = 'de.sebastianboegl.shadow.transformer.log4j'
displayName = 'shadow transformer plugin for log4j'
}
}
}
gradlePlugin {
plugins {
log4jShadowTransformer {
id = 'de.sebastianboegl.shadow.transformer.log4j'
implementationClass = 'de.sebastianboegl.gradle.plugins.Log4jTransformerPlugin'
}
}
}
publishing.repositories {
maven {
url "maven-repo"
}
}
bintray {
pkg {
repo = 'gradle-plugins'
version {
vcsTag = "v${project.version}"
}
}
}
publishPlugins.dependsOn build
//createReleaseTag.dependsOn publish
wrapper {
gradleVersion = gradle_Version
distributionType = Wrapper.DistributionType.ALL
}
tasks.withType(Test) {
systemProperty 'org.gradle.testkit.debug', System.getProperty('org.gradle.testkit.debug', 'false')
}