Skip to content

Commit 0945890

Browse files
committed
build.gradle: include Main-Class in jar
Although it only makes sense for the -lib jar; however this avoids to use both one-jar and the libJar task; the former is now dropped entirely. Signed-off-by: Francis Galiegue <[email protected]>
1 parent 7999395 commit 0945890

File tree

1 file changed

+5
-28
lines changed

1 file changed

+5
-28
lines changed

build.gradle

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -35,35 +35,13 @@
3535
*
3636
* https://github.com/spring-projects/gradle-plugins/tree/master/propdeps-plugin
3737
*/
38-
buildscript {
39-
repositories {
40-
mavenCentral();
41-
// maven {
42-
// url "http://repo.springsource.org/plugins-release";
43-
// }
44-
}
45-
dependencies {
46-
classpath(group: "com.github.rholder", name: "gradle-one-jar",
47-
version: "1.0.4");
48-
// classpath(group: "org.springframework.build.gradle",
49-
// name: "propdeps-plugin", version: "0.0.5");
50-
}
51-
};
52-
53-
//configure(allprojects) {
54-
// apply(plugin: "propdeps");
55-
// apply(plugin: "propdeps-maven");
56-
// apply(plugin: "propdeps-idea");
57-
// apply(plugin: "propdeps-eclipse");
58-
//}
5938

6039
apply(plugin: "java");
6140
apply(plugin: "maven");
6241
apply(plugin: "signing");
6342
apply(plugin: "osgi");
6443
apply(plugin: "idea");
6544
apply(plugin: "eclipse");
66-
apply(plugin: "gradle-one-jar");
6745

6846
group = "com.github.fge";
6947
version = "2.2.5-SNAPSHOT";
@@ -164,11 +142,6 @@ task javadocJar(type: Jar, dependsOn: copyDocFiles) {
164142
from javadoc.destinationDir;
165143
}
166144

167-
task fullJar(type: OneJar) {
168-
mainClass = "com.github.fge.jsonschema.main.cli.Main";
169-
archiveName = "jsonschema.jar";
170-
}
171-
172145
/*
173146
* Creates a jar that can be used as a library on java projects.
174147
* This jar already includes all the dependencies.
@@ -181,11 +154,15 @@ task libJar(type: Jar, dependsOn: jar) {
181154
with jar;
182155
}
183156

157+
jar {
158+
manifest {
159+
attributes("Main-Class": "com.github.fge.jsonschema.main.cli.Main");
160+
}
161+
}
184162
artifacts {
185163
archives jar;
186164
archives sourcesJar;
187165
archives javadocJar;
188-
archives fullJar;
189166
archives libJar;
190167
}
191168

0 commit comments

Comments
 (0)