Skip to content

Commit

Permalink
Merge pull request #11 from Hopding/issue10
Browse files Browse the repository at this point in the history
Changed build tasks and added maven gradle plugin
  • Loading branch information
Hopding authored Jan 28, 2017
2 parents 389b09d + 6ba8977 commit 3697376
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 24 deletions.
23 changes: 9 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Because JRPiCam works by invoking the `raspistill` software, it is important tha
instructions can be found [here](https://www.raspberrypi.org/documentation/configuration/camera.md).

# Using JRPiCam
To use JRPiCam in your project, just download and unzip the most recent [release](https://github.com/Hopding/JRPiCam/releases/tag/v1.1.0), then add the `jrpicam-1.1.0.jar` file to your project's build path.
To use JRPiCam in your project, just download and unzip the most recent [release](https://github.com/Hopding/JRPiCam/releases/tag/v1.1.1), then add the `jrpicam-1.1.1.jar` file to your project's build path.

The core component of JRPiCam is the `RPiCamera` class, which can be instantiated as follows:
```java
Expand Down Expand Up @@ -55,26 +55,26 @@ The Javadoc for the project is hosted online [here](http://hopding.com/docs/jrpi
# Examples
The releases contain a number of example JARs (pre-built JARs of the classes in the `src/main/java/com/hopding/jrpicam/examples` directory) that can be executed on the RPi's terminal:

* `demo-view-1.1.0.jar`
* `shoot-buffered-still-1.1.0.jar`
* `shoot-still-1.1.0.jar`
* `shoot-timelapse-1.1.0.jar`
* `demo-view-1.1.1.jar`
* `shoot-buffered-still-1.1.1.jar`
* `shoot-still-1.1.1.jar`
* `shoot-timelapse-1.1.1.jar`

`demo-view-1.1.0.jar` runs a demo gui program that illustrates some functions of JRPiCam. The rest of the examples show how to do things like take a still image, save it, load it into a buffer, and take a series of images.
`demo-view-1.1.1.jar` runs a demo gui program that illustrates some functions of JRPiCam. The rest of the examples show how to do things like take a still image, save it, load it into a buffer, and take a series of images.

To run them, just download and unzip the most recent [release](https://github.com/Hopding/JRPiCam/releases/tag/v1.1.0), open it in a terminal, and run the following:
To run them, just download and unzip the most recent [release](https://github.com/Hopding/JRPiCam/releases/tag/v1.1.1), open it in a terminal, and run the following:
```
$ java -jar examples/[jar name]
```
for example:
```
$ java -jar examples/demo-view-1.1.0.jar
$ java -jar examples/demo-view-1.1.1.jar
```

# Building the Project
JRPiCam is structured as a Gradle project. It contains tasks to build the library JAR, the example JARs, and the Javadoc. To build the project, you must first clone or download the project repository, and open a terminal therein. Then, assuming you're using Windows' Powershell or Unix's Bash:

* To build the main library JAR (`jrpicam-1.1.0.jar`):
* To build the main library JAR (`jrpicam-1.1.1.jar`):
```
$ ./gradlew jar
```
Expand All @@ -86,9 +86,4 @@ $ ./gradlew buildExamples
```
$ ./gradlew javadoc
```
* It is also possible to generate the main library JAR and the example JARs at the same time:
```
$ ./gradlew build
```

The JAR files will be located in the `build/libs` directory. The Javadoc will be located at `build/docs/javadoc`.
12 changes: 2 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
group 'hopding.jrpicam'
version '1.1.0'
version '1.1.1'

apply plugin: 'java'
apply plugin: 'maven'

sourceCompatibility = 1.8

Expand Down Expand Up @@ -85,12 +86,3 @@ task buildExamples (dependsOn: [
'shootBufferedStillJAR',
'shootStillJAR',
'shootTimelapseJAR'])

// JAR files to generate on build task being called
artifacts {
archives jar,
demoViewJAR,
shootBufferedStillJAR,
shootStillJAR,
shootTimelapseJAR
}

0 comments on commit 3697376

Please sign in to comment.