Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

improve gradle build

  • Loading branch information...
commit 481e2b285680523c3951347be2e83af1f991de92 1 parent 51d2f21
@psiegman authored
View
7 build.gradle
@@ -19,4 +19,9 @@ task newJavadoc(type: Javadoc) {
classpath = files(subprojects.collect { project ->
project.sourceSets.main.compileClasspath
})
-}
+}
+
+repositories {
+ mavenCentral()
+ mavenRepo urls: 'http://repository.jboss.org/nexus/content/groups/public'
+}
View
13 epublib-core/build.gradle
@@ -2,12 +2,8 @@ apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'maven'
-repositories {
- mavenCentral()
- mavenRepo urls: 'http://repository.jboss.org/nexus/content/groups/public'
-}
-task createPom << {
+task generatePom << {
pom {
project {
version '3.0-SNAPSHOT'
@@ -69,6 +65,13 @@ task createPom << {
}.writeTo("newpom.xml")
}
+/* creates complete jar
+jar {
+ from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
+}
+The above snippet will only include the compile dependencies for that project, not any transitive runtime dependencies. If you also want to merge those, replace configurations.compile with configurations.runtime.
+*/
+
dependencies {
compile 'net.sf.kxml:kxml2:2.3.0'
compile 'xmlpull:xmlpull:1.1.3.4d_b4_min'
View
106 epublib-tools/build.gradle
@@ -0,0 +1,106 @@
+apply plugin: 'java'
+apply plugin: 'eclipse'
+apply plugin: 'maven'
+
+
+task generatePom << {
+ pom {
+ project {
+ version '3.0-SNAPSHOT'
+ description 'A java library for reading/writing/manipulating epub files'
+ url 'http://www.siegmann.nl/epublib'
+ inceptionYear '2009'
+
+ parent 'nl.siegmann.epublib:epublib-parent:3.0-SNAPSHOT'
+
+ licenses {
+ license {
+ name 'GNU Lesser General Public License, Version 3.0'
+ url 'http://www.gnu.org/licenses/lgpl.html'
+ distribution 'repo'
+ }
+ }
+
+ developers {
+ developer {
+ id 'paul'
+ name 'Paul Siegmann'
+ email 'paul.siegmann+epublib@gmail.com'
+ url 'http://www.siegmann.nl/'
+ timezone '+1'
+ }
+ }
+
+ issueManagement {
+ system 'github'
+ url 'http://github.com/psiegman/epublib/issues'
+ }
+
+
+ scm {
+ url 'http://github.com/psiegman/epublib'
+ connection 'scm:git:https://psiegman@github.com/psiegman/epublib.git'
+ developerConnection 'scm:git:https://psiegman@github.com/psiegman/epublib.git'
+ }
+
+ build {
+ plugins {
+ plugin ('org.apache.maven.plugins:maven-shade-plugin:1.4') {
+ executions {
+ execution {
+ phase 'package'
+ goals {
+ goal 'shade'
+ }
+ configuration {
+ shadedArtifactAttached 'true'
+ shadedClassifierName 'complete'
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }.writeTo("newpom.xml")
+}
+
+
+dependencies {
+ compile 'nl.siegmann.epublib:epublib-core:3.0-SNAPSHOT'
+ compile ('net.sourceforge.htmlcleaner:htmlcleaner:2.2') {
+ exclude group: 'org.jdom', name: 'jdom'
+ exclude group: 'org.apache.ant', name: 'ant'
+ }
+ compile 'commons-lang:commons-lang:2.4'
+ compile 'net.sf.kxml:kxml2:2.3.0'
+ compile 'xmlpull:xmlpull:1.1.3.4d_b4_min'
+ compile 'commons-io:commons-io:2.0.1'
+ compile "org.slf4j:slf4j-api:1.6.1"
+ compile "org.slf4j:slf4j-simple:1.6.1"
+ compile 'commons-vfs:commons-vfs:1.0'
+ testRuntime 'junit:junit:3.8.1'
+}
+
+/*
+how to aggregate javadocs
+
+(solution copied from Adam Murdoch's email: http://gradle.1045684.n5.nabble.com/aggregating-javadocs-td1433469.html#a1433469)
+build.gradle
+task javadoc(type: Javadoc) {
+ source subprojects.collect { project ->
+ project.sourceSets.main.allJava
+ }
+ destinationDir = new File(buildDir, 'javadoc')
+ // Might need a classpath
+ classpath = files(subprojects.collect { project ->
+ project.sourceSets.main.compileClasspath
+ })
+}
+*/
+
+repositories {
+ mavenLocal()
+ mavenCentral()
+ mavenRepo urls: 'http://repository.jboss.org/nexus/content/groups/public'
+}
Please sign in to comment.
Something went wrong with that request. Please try again.