Skip to content

Commit

Permalink
Update gradle build script, added script to create maven artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
fastily committed Sep 8, 2016
1 parent dbe67ae commit ffc2ae8
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 13 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jwiki is a simple Java client library wrapping the [MediaWiki](https://www.media
* [Quick Start Guide](https://github.com/fastily/jwiki/wiki/Quick-Start-Guide)
* [Javadocs](https://fastily.github.io/jwiki/docs/jwiki/)
* Main class: [Wiki.java](https://github.com/fastily/jwiki/blob/master/src/jwiki/core/Wiki.java)
* [Maven/Gradle settings](https://bintray.com/fastily/maven/jwiki)

###Example Code
```java
Expand Down
1 change: 0 additions & 1 deletion ToDo.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@

### Usability
* Verify correct error values in QueryTests
* JSON fmt 2
* NS handling could use some refactoring
* TPlate does not properly handle templates params with more than one string/template/nowiki/comment.
6 changes: 1 addition & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'maven'
apply plugin: 'maven-publish'

version="1.2.1"
description="jwiki build script"
Expand Down Expand Up @@ -34,7 +35,6 @@ task writeNewPom << {
}
}.writeTo("$buildDir/pom.xml")
}

build.finalizedBy(writeNewPom)


Expand All @@ -45,7 +45,6 @@ task genJavadoc(type: Javadoc) {
{
links "https://fastily.github.io/jwiki/docs/JSON-java/"
links "https://docs.oracle.com/javase/8/docs/api/"
//setOutputLevel JavadocOutputLevel.VERBOSE

setMemberLevel JavadocMemberLevel.PUBLIC
setAuthor true
Expand All @@ -54,13 +53,10 @@ task genJavadoc(type: Javadoc) {
classpath = configurations.compile
}

// In this section you declare where to find the dependencies of your project
repositories {
//jcenter()
mavenCentral()
}

// In this section you declare the dependencies for your production and test code
dependencies {
// The production code uses the SLF4J logging API at compile time
compile 'org.slf4j:slf4j-api:1.7.21'
Expand Down
29 changes: 29 additions & 0 deletions genArtifacts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

#: Generates Maven artifacts for jwiki.
#:
#: PRECONDITION: gradle build succeeded. Minimum gradle version >= 3.0
#:
#: Tested on OS X 10.11.6
#: Author: Fastily

version="1.2.1"
name="jwiki"
outputDir="build/artifacts"

cd "${0%/*}"
mkdir -p "$outputDir"

## Copy sources
jar cf "${outputDir}/${name}-${version}-sources.jar" -C "src/main/java/" .

## Copy javadocs
jar cf "${outputDir}/${name}-${version}-javadoc.jar" -C "build/docs/javadoc/" .

## Copy compiled files
cp build/libs/*.jar "$outputDir"

## Copy generated pom
cp "build/pom.xml" "${outputDir}/${name}-${version}.pom"

printf "Done!\n"
7 changes: 0 additions & 7 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
/*
// To declare projects as part of a multi-project build use the 'include' method
include 'shared'
include 'api'
include 'services:webservice'
*/

rootProject.name = 'jwiki'

0 comments on commit ffc2ae8

Please sign in to comment.