Skip to content

Commit

Permalink
V1.2.0ea
Browse files Browse the repository at this point in the history
  • Loading branch information
HansNewbie committed Jul 11, 2016
2 parents 0750697 + 26ecc6e commit f3118a3
Show file tree
Hide file tree
Showing 143 changed files with 5,989 additions and 2,108 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
language: java
matrix:
include:
- env: TESTTYPE=headless
jdk: oraclejdk8
script: travis_retry ./gradlew clean $TESTTYPE jacocoRootReport coveralls
- jdk: oraclejdk8
script: travis_retry ./gradlew clean headless allTests coverage coveralls -i
before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
Expand Down
42 changes: 21 additions & 21 deletions UpdateData.json
Original file line number Diff line number Diff line change
@@ -1,81 +1,81 @@
{
"version" : "V1.1.0ea",
"mainApp" : "https://github.com/HubTurbo/addressbook/releases/download/V1.1.0ea/resource-V1.1.0ea.jar",
"version" : "V1.2.0ea",
"mainApp" : "https://github.com/HubTurbo/addressbook/releases/download/Resources/resource-V1.2.0ea.jar",
"libraries" : [ {
"filename" : "licence.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/V0.0.2/licence.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/Resources/licence.jar",
"os" : "ANY"
}, {
"filename" : "log4j-api-2.6.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/V0.0.1/log4j-api-2.6.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/Resources/log4j-api-2.6.jar",
"os" : "ANY"
}, {
"filename" : "log4j-core-2.6.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/V0.0.1/log4j-core-2.6.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/Resources/log4j-core-2.6.jar",
"os" : "ANY"
}, {
"filename" : "slf4j-simple-1.6.4.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/V0.0.1/slf4j-simple-1.6.4.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/Resources/slf4j-simple-1.6.4.jar",
"os" : "ANY"
}, {
"filename" : "commons-io-2.4.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/V0.0.0/commons-io-2.4.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/Resources/commons-io-2.4.jar",
"os" : "ANY"
}, {
"filename" : "controlsfx-8.40.10.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/V0.0.0/controlsfx-8.40.10.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/Resources/controlsfx-8.40.10.jar",
"os" : "ANY"
}, {
"filename" : "jackson-datatype-jsr310-2.7.4.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/V0.0.0/jackson-datatype-jsr310-2.7.4.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/Resources/jackson-datatype-jsr310-2.7.4.jar",
"os" : "ANY"
}, {
"filename" : "guava-19.0.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/V0.0.0/guava-19.0.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/Resources/guava-19.0.jar",
"os" : "ANY"
}, {
"filename" : "jxbrowser-win-6.4.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/V0.0.0/jxbrowser-win-6.4.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/Resources/jxbrowser-win-6.4.jar",
"os" : "WINDOWS"
}, {
"filename" : "jxbrowser-mac-6.4.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/V0.0.0/jxbrowser-mac-6.4.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/Resources/jxbrowser-mac-6.4.jar",
"os" : "MAC"
}, {
"filename" : "jxbrowser-linux32-6.4.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/V0.0.0/jxbrowser-linux32-6.4.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/Resources/jxbrowser-linux32-6.4.jar",
"os" : "LINUX32"
}, {
"filename" : "jxbrowser-linux64-6.4.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/V0.0.0/jxbrowser-linux64-6.4.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/Resources/jxbrowser-linux64-6.4.jar",
"os" : "LINUX64"
}, {
"filename" : "jkeymaster-1.2.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/V0.0.1/jkeymaster-1.2.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/Resources/jkeymaster-1.2.jar",
"os" : "ANY"
}, {
"filename" : "jackson-annotations-2.7.0.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/V0.0.0/jackson-annotations-2.7.0.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/Resources/jackson-annotations-2.7.0.jar",
"os" : "ANY"
}, {
"filename" : "jxbrowser-6.4.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/V0.0.0/jxbrowser-6.4.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/Resources/jxbrowser-6.4.jar",
"os" : "ANY"
}, {
"filename" : "jna-4.2.1.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/V0.0.1/jna-4.2.1.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/Resources/jna-4.2.1.jar",
"os" : "ANY"
}, {
"filename" : "jackson-core-2.7.4.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/V0.0.0/jackson-core-2.7.4.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/Resources/jackson-core-2.7.4.jar",
"os" : "ANY"
}, {
"filename" : "jackson-databind-2.7.4.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/V0.0.0/jackson-databind-2.7.4.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/Resources/jackson-databind-2.7.4.jar",
"os" : "ANY"
}, {
"filename" : "slf4j-api-1.7.13.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/V0.0.1/slf4j-api-1.7.13.jar",
"downloadLink" : "https://github.com/HubTurbo/addressbook/releases/download/Resources/slf4j-api-1.7.13.jar",
"os" : "ANY"
} ]
}
112 changes: 76 additions & 36 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {

allprojects {

version = 'V1.1.0ea'
version = 'V1.2.0ea'

apply plugin: 'idea'
apply plugin: 'java'
Expand Down Expand Up @@ -51,8 +51,12 @@ allprojects {
mockServerVersion = '3.10.1'
powermockVersion = '1.6.5'
testFxVersion = '3.1.0'
monocleVersion = '1.8.0_20'
slf4jSimpleVersion = '1.6.4'
commonsIoVersion = '2.4'

mainAppArchiveName = 'resource-' + project.version + '.jar'
jarUpdaterDestDir = 'src/main/resources/updater'
jarUpdaterArchiveName = 'jarUpdater.jar'
}

Expand Down Expand Up @@ -108,8 +112,8 @@ allprojects {
dependencies {
compile "org.apache.logging.log4j:log4j-api:$log4jVersion"
compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
compile "org.slf4j:slf4j-simple:1.6.4" // Required to suppress warning, for jkeymaster, see http://www.slf4j.org/codes.html#StaticLoggerBinder
compile 'commons-io:commons-io:2.4'
compile "org.slf4j:slf4j-simple:$slf4jSimpleVersion" // Required to suppress warning, for jkeymaster, see http://www.slf4j.org/codes.html#StaticLoggerBinder
compile "commons-io:commons-io:$commonsIoVersion"
compile "org.controlsfx:controlsfx:$controlsFxVersion"
compile "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion"
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jacksonDataTypeVersion"
Expand All @@ -129,10 +133,9 @@ allprojects {
exclude group: "junit", module: "junit"
}
testCompile "org.mockito:mockito-core:$mockitoVersion"
testCompile group: "org.mock-server", name: "mockserver-netty", version: "$mockServerVersion"
testCompile "org.powermock:powermock-api-mockito:$powermockVersion"
testCompile "org.powermock:powermock-module-junit4:$powermockVersion"
testCompile 'org.testfx:openjfx-monocle:1.8.0_20'
testCompile "org.testfx:openjfx-monocle:$monocleVersion"

installerCompile "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion"
installerCompile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jacksonDataTypeVersion"
Expand All @@ -159,6 +162,12 @@ allprojects {
args arguments.split()
}

task removeCurrentJarUpdater(type: Delete) {
group = "Release"

delete project.ext.jarUpdaterDestDir + '/' + project.ext.jarUpdaterArchiveName
}

task createJarUpdater(type: Jar) {
group = "Release"

Expand All @@ -171,16 +180,18 @@ allprojects {
}

archiveName = project.ext.jarUpdaterArchiveName
destinationDir = file('src/main/resources/updater')
destinationDir = file(project.ext.jarUpdaterDestDir)

// Specify classes needed for Jar Updater
from(sourceSets.main.output.resourcesDir) {
include 'log4j2.json'
}
from sourceSets.main.output
exclude '**/jarUpdater.jar'
}

createJarUpdater.dependsOn clean
createJarUpdater.dependsOn removeCurrentJarUpdater

task copyDependencyLibrariesToReleaseDir(type: Copy) {
group = "Release"
Expand Down Expand Up @@ -254,12 +265,18 @@ allprojects {
createInstallerJar.dependsOn createMainAppExecutable
}

test {
forkEvery = 1
systemProperty 'testfx.setup.timeout', '60000'
task wrapper(type: Wrapper) {
gradleVersion = '2.12'
}

tasks.withType(FindBugs) {
reports {
xml.enabled = false
html.enabled = true
}
}

task jacocoRootReport(type: JacocoReport) {
task coverage(type: JacocoReport) {
sourceDirectories = files(allprojects.sourceSets.main.allSource.srcDirs)
classDirectories = files(allprojects.sourceSets.main.output)
executionData = files(allprojects.jacocoTestReport.executionData)
Expand All @@ -276,57 +293,80 @@ task jacocoRootReport(type: JacocoReport) {

coveralls {
sourceDirs = allprojects.sourceSets.main.allSource.srcDirs.flatten()
jacocoReportPath = "${buildDir}/reports/jacoco/jacocoRootReport/jacocoRootReport.xml"
jacocoReportPath = "${buildDir}/reports/jacoco/coverage/coverage.xml"
}

tasks.coveralls {
group = 'Coverage reports'
description = 'Uploads the aggregated coverage report to Coveralls'

dependsOn jacocoRootReport
dependsOn coverage
onlyIf { System.env.'CI' }
}

task wrapper(type: Wrapper) {
gradleVersion = '2.12'
task checkStyle { // A dummy task to run a set of tasks
}

tasks.withType(FindBugs) {
reports {
xml.enabled = false
html.enabled = true
class AddressBookTest extends Test {
public AddressBookTest() {
forkEvery = 1
systemProperty 'testfx.setup.timeout', '60000'
}
}

task coverage {
}
task checkStyle {
public void setHeadless() {
systemProperty 'java.awt.robot', 'true'
systemProperty 'testfx.robot', 'glass'
systemProperty 'testfx.headless', 'true'
systemProperty 'prism.order', 'sw'
systemProperty 'prism.text', 't2k'
}
}

task guiTests(type: AddressBookTest) {
include 'guitests/**'
jacoco {
destinationFile = new File("${buildDir}/jacoco/test.exec")
}
}

task headless(type: Test) {
systemProperty 'java.awt.robot', 'true'
systemProperty 'testfx.robot', 'glass'
systemProperty 'testfx.headless', 'true'
systemProperty 'prism.order', 'sw'
systemProperty 'prism.text', 't2k'

task guiUnitTests(type: AddressBookTest) {
include 'guiunittests/**'
jacoco {
destinationFile = new File("${buildDir}/jacoco/test.exec")
}
}

task unitTests(type: AddressBookTest) {
include 'address/**'
jacoco {
destinationFile = new File("${buildDir}/jacoco/test.exec")
}
}

task headful(type: Test) {
task allTests(type: AddressBookTest) {
jacoco {
destinationFile = new File("${buildDir}/jacoco/test.exec")
}
}

task headless << {
println "Setting headless mode properties."
guiTests.setHeadless()
guiUnitTests.setHeadless()
unitTests.setHeadless()
allTests.setHeadless()
}

// Makes sure that headless properties are set before running tests
unitTests.mustRunAfter headless
guiUnitTests.mustRunAfter headless
guiTests.mustRunAfter headless
allTests.mustRunAfter headless

headless.shouldRunAfter checkStyle
headful.shouldRunAfter checkStyle
unitTests.shouldRunAfter checkStyle
guiUnitTests.shouldRunAfter checkStyle
guiTests.shouldRunAfter checkStyle
allTests.shouldRunAfter checkStyle

checkStyle.shouldRunAfter clean
checkStyle.dependsOn checkstyleMain, checkstyleTest, findbugsMain, findbugsTest, pmdMain, pmdTest
coverage.dependsOn jacocoTestReport

defaultTasks 'clean', 'headless', 'jacocoRootReport'
defaultTasks 'clean', 'headless', 'allTests', 'coverage'
7 changes: 4 additions & 3 deletions docs/KeyboardShortcuts.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@

| Shortcut | Action |
| ------------------------------------: |--------|
| <kbd>D</kbd> | **D**elete selected person |
| <kbd>E</kbd> | **E**dit selected person |
| <kbd>A</kbd> | t**A**g the selected person |
| <kbd>D</kbd> | **D**elete the selected person |
| <kbd>E</kbd> | **E**dit the selected person |
| <kbd>G</kbd>,<kbd>B</kbd> | **G**o to **B**ottom of the list |
| <kbd>G</kbd>,<kbd>T</kbd> | **G**o to **T**op of the list |
| <kbd>Ctrl + N</kbd> | **N**ew file |
Expand All @@ -22,4 +23,4 @@ Unlike keyboard shortcuts given above, hotkeys work even when the app is not in
| Shortcut | Action |
| ------------------------------------: |--------|
| <kbd>Ctrl + Alt + X</kbd> | Minimize app |
| <kbd>Ctrl + Shift + X</kbd> | Maximize app |
| <kbd>Ctrl + Shift + X</kbd> | Toggle between maximum and default app Window sizes|
8 changes: 6 additions & 2 deletions docs/Release.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ as `true` and add `ea` at the end of version in `build.gradle`.
- This is so that the git tag that GitHub release creates will appropriately tag the commit with updated `UpdateData.json`
5. Create a release in [GitHub](https://github.com/HubTurbo/addressbook/releases) and tag the corresponding branch (`early-access` or `stable`)
6. Run `gradle` task `createInstallerJar` under `release` category (this must be run again to use the updated `UpdateData.json`)
7. Upload the following as binaries to the latest release:
- addressbook.jar
7. Upload `addressbook.jar` to the latest release.
8. Upload the following as binaries to the (`resource` release)[https://github.com/HubTurbo/addressbook/releases/tag/resources]:
- resource-\<version\>.jar
- all the jars inside `lib` directory which are mentioned in (2)

Expand Down Expand Up @@ -158,6 +158,10 @@ Currently, Installer needs Jackson to parse the update data for dependency setti
to Installer JAR; it will need `lib/[jackson].jar` to work. Those Jackson JARs are inside Installer JAR as resource, though,
which will be unpacked anyway. Hence, JSON parsing in Installer must be called only after it unpacks itself.

Installer will launch the main application with `enable assertion` argument to enable assertion in production. On first
run, it will unpack the libraries JARs and the main app JAR then launch the main app. On the next runs, it acts as a
launcher to enable assertion in production.

## To be improved

### Automate generateUpdateData
Expand Down
Loading

0 comments on commit f3118a3

Please sign in to comment.