forked from shevek/jarjar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
148 lines (120 loc) · 3.13 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
buildscript {
apply from: file('gradle/buildscript.gradle'), to: buildscript
}
apply plugin: 'org.anarres.stdproject'
stdproject {
}
subprojects {
apply plugin: 'org.anarres.stdmodule'
stdmodule {
description "Jar Jar Links is a utility that makes it easy to repackage Java libraries and embed them into your own distribution."
author id: 'shevek', name: 'Shevek', email: '[email protected]'
license 'Apache-2.0'
}
group = "org.anarres.jarjar"
dependencies {
compile 'com.google.code.findbugs:jsr305:2.0.2'
compile 'org.slf4j:slf4j-api:1.7.12'
}
sourceCompatibility = 1.5
animalsniffer {
signature = "org.codehaus.mojo.signature:java15:+@signature"
}
}
project(':jarjar-testdata') {
dependencies {
compile 'com.google.guava:guava:17.0'
}
for (int i = 0; i < 4; i++) {
String name = "jar$i";
Task t = task(name, type: Jar) {
classifier = name
from(sourceSets.main.output) {
include "**/pkg$i/**";
}
}
artifacts {
archives t
}
}
/*
assemble << {
println configurations.archives.dump()
println "\nArtifacts:\n" + configurations.archives.artifacts.dump()
println "\nFiles:\n" + configurations.archives.files.dump()
println "\nEach:\n"
for (Object o : configurations.archives.artifacts.files) {
println o.dump()
}
// println configurations.archives
println jar0.dump()
println jar0.archivePath
}
*/
uploadArchives.enabled = false
}
project(':jarjar-core') {
dependencies {
compile 'org.ow2.asm:asm-commons:5.0.3'
compile 'org.ow2.asm:asm-util:5.0.3'
// compile 'org.ow2.asm:asm-commons:4.0'
// testCompile project(':jarjar-testdata')
}
def samplesProject = project(':jarjar-testdata')
test.dependsOn samplesProject.tasks['assemble']
test {
systemProperty "jar", samplesProject.jar.archivePath
for (int i = 0; i < 4; i++) {
systemProperty "jar$i", samplesProject."jar$i".archivePath
}
}
}
project(':jarjar-ant') {
dependencies {
compile project(':jarjar-core')
compile 'org.apache.ant:ant:1.7.0'
testCompile project(':jarjar-core').sourceSets.test.output
}
}
project(':jarjar-maven') {
dependencies {
compile project(':jarjar-core')
compile 'org.apache.maven:maven-plugin-api:2.0'
testCompile project(':jarjar-core').sourceSets.test.output
}
}
project(':jarjar-gradle') {
apply plugin: 'org.anarres.stdplugin'
stdplugin {
implementation "org.anarres.jarjar", "org.anarres.gradle.plugin.jarjar.JarjarPlugin"
}
/*
tasks.removeAll {
// println it.dump();
// println it.name;
return it.name == "sourcesJar";
}
// apply plugin: 'java-gradle-plugin'
// apply plugin: 'nu.studer.plugindev'
// apply from: file('../gradle/plugin.gradle')
*/
dependencies {
compile project(':jarjar-core')
compile 'org.apache.commons:commons-compress:1.9'
compile gradleApi()
compile 'oro:oro:2.0.8'
testCompile project(':jarjar-core').sourceSets.test.output
}
animalsniffer {
skip = true
}
}
project(':jarjar-command') {
dependencies {
compile project(':jarjar-core')
compile 'net.sf.jopt-simple:jopt-simple:4.8'
testCompile project(':jarjar-core').sourceSets.test.output
}
apply plugin: 'application'
mainClassName = "com.tonicsystems.jarjar.Main"
}