-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* release/8: Replace account number by UUID Use OpenJDK 8 for Travis CI Keep a changelog Bump build number Update Gradle, Gradle plugins and Java dependencies Support dark mode Replace FindBugs by SpotBugs Update PMD Integrate with SonarCloud Introduce Dagger for dependency injection Extend copyright notice Replace JMockit by JaCoCo Save default account selection Reduce state handling Introduce Optionals and Streams Increase testability and enable Travis CI integration with Gitflow workflow Fix medium bugs reported by FindBugs Replace deprecated API calls Update Gradle
- Loading branch information
Showing
148 changed files
with
2,752 additions
and
1,992 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,22 @@ | ||
language: java | ||
jdk: | ||
- oraclejdk8 | ||
- openjdk8 | ||
before_cache: | ||
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock | ||
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/ | ||
cache: | ||
directories: | ||
- $HOME/.gradle/caches/ | ||
- $HOME/.gradle/wrapper/ | ||
- $HOME/.sonar/cache/ | ||
branches: | ||
only: | ||
- master | ||
- develop | ||
- /^feature\/\S+$/ | ||
- /^hotfix\/\S+$/ | ||
- /^release\/\S+$/ | ||
- gh-pages | ||
script: | ||
- ./gradlew check | ||
- ./gradlew sonarqube -Dsonar.login="${SONAR_TOKEN}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com), | ||
and this project does *not* adhere to Semantic Versioning. | ||
|
||
## [v8] - 2019-10-07 | ||
### Added | ||
- Support for dark mode. | ||
- [JaCoCo Java Code Coverage Library](https://www.jacoco.org/jacoco/). | ||
- This changelog file. | ||
|
||
### Changed | ||
- Introduce [Dagger](https://dagger.dev) for dependency injection. | ||
- Replace [FindBugs](http://findbugs.sourceforge.net) by [SpotBugs](https://spotbugs.github.io). | ||
|
||
### Fixed | ||
- Crash in Moneydance 2019 when importing into new account. | ||
- Remember designated account ([#13]). | ||
|
||
|
||
## [v7] - 2018-05-12 | ||
### Added | ||
- Compile-time data to manifest file. | ||
|
||
### Removed | ||
- Google Analytics tracker. | ||
|
||
|
||
## [v6] - 2016-06-06 | ||
### Changed | ||
- Show wizard immediately after installation of extension. | ||
- Build automation system from Apache Ant to Gradle. | ||
- Replace Google Analytics tracking component. | ||
|
||
### Fixed | ||
- Creation of duplicate transactions ([#8]). | ||
- Remember API username and signature in Moneydance 2015.7 ([#9]). | ||
|
||
|
||
## [v5] - 2015-02-18 | ||
### Added | ||
- Continuous integration testing on [Travis CI](https://travis-ci.org/my-flow/paypalimporter). | ||
- Prerequisite: Moneydance 2015 or later. | ||
- Prerequisite: Java 7 or later versions. | ||
|
||
### Removed | ||
- Compatibility with Moneydance 2014 and earlier versions. | ||
- Compatibility with Java 6 and earlier versions. | ||
|
||
|
||
## [v4] - 2014-11-14 | ||
### Added | ||
- Tracking of unexpected exceptions. | ||
- Human-readable error message for login failures. | ||
|
||
|
||
## [v3] - 2013-12-13 | ||
### Added | ||
- Support for proxy settings. | ||
|
||
|
||
## [v2] - 2013-10-11 | ||
### Added | ||
- Support for downloading an unlimited amount of PayPal transactions ([#4]). | ||
- Temporary caching of API password. | ||
- Compatibility with Moneydance 2008 and Moneydance 2010. | ||
|
||
### Changed | ||
- Warning message if PayPal account has multiple currencies ([#2]). | ||
|
||
### Fixed | ||
- Issue where password would be stored even if the checkbox was not checked. | ||
|
||
|
||
## [v1] - 2013-08-03 | ||
### Added | ||
- First version based on [Apache Ant](https://ant.apache.org)’s build automation system. | ||
- Compatibility with Moneydance 2007. | ||
- Compatibility with Java 1.3 and later versions. | ||
|
||
|
||
[#13]: https://github.com/my-flow/paypalimporter/issues/13 | ||
[#9]: https://github.com/my-flow/paypalimporter/issues/9 | ||
[#8]: https://github.com/my-flow/paypalimporter/issues/8 | ||
[#4]: https://github.com/my-flow/paypalimporter/issues/4 | ||
[#2]: https://github.com/my-flow/paypalimporter/issues/2 | ||
|
||
[v8]: https://github.com/my-flow/paypalimporter/compare/v7...v8 | ||
[v7]: https://github.com/my-flow/paypalimporter/compare/v6...v7 | ||
[v6]: https://github.com/my-flow/paypalimporter/compare/v5...v6 | ||
[v5]: https://github.com/my-flow/paypalimporter/compare/v4...v5 | ||
[v4]: https://github.com/my-flow/paypalimporter/compare/v3...v4 | ||
[v3]: https://github.com/my-flow/paypalimporter/compare/v2...v3 | ||
[v2]: https://github.com/my-flow/paypalimporter/compare/v1...v2 | ||
[v1]: https://github.com/my-flow/paypalimporter/commits/v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.PHONY: test | ||
|
||
test: | ||
./gradlew clean check | ||
./gradlew assemble sign <<< '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ the extension please visit the | |
[project page](http://my-flow.github.io/paypalimporter/). | ||
|
||
## Build Prerequisites | ||
Java Development Kit, version 7 | ||
Java Development Kit, version 8 | ||
|
||
## Building the extension | ||
1. `git clone [email protected]:my-flow/paypalimporter.git` creates a copy of the | ||
|
@@ -29,9 +29,11 @@ The project consists of 2 gradle sub-projects: | |
mock-ups) and the test cases. It depends from the core project. | ||
|
||
## Documentation | ||
* [Changelog](CHANGELOG.md) | ||
* [PayPal Importer API](http://my-flow.github.io/paypalimporter/docs/api/) | ||
* [JMockit Coverage Report](http://my-flow.github.io/paypalimporter/docs/coverage-report/) | ||
* [Coverage Report](http://my-flow.github.io/paypalimporter/docs/coverage-report/) | ||
* [SonarCloud](https://sonarcloud.io/organizations/paypalimporter/) | ||
|
||
## License | ||
Copyright (C) 2013-2018 [Florian J. Breunig](http://www.my-flow.com). | ||
Copyright (C) 2013-2019 [Florian J. Breunig](http://www.my-flow.com). | ||
All rights reserved. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,108 @@ | ||
import java.text.SimpleDateFormat | ||
|
||
import org.apache.commons.configuration.Configuration; | ||
import org.apache.commons.configuration.PropertiesConfiguration | ||
|
||
buildscript { | ||
repositories { | ||
mavenCentral() | ||
jcenter() | ||
maven { | ||
url "https://plugins.gradle.org/m2/" | ||
} | ||
} | ||
dependencies { | ||
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.4' | ||
classpath 'net.ltgt.gradle:gradle-apt-plugin:0.21' | ||
classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.3' | ||
classpath 'commons-configuration:commons-configuration:1.10' | ||
classpath 'net.sf.proguard:proguard-gradle:6.0.2' | ||
classpath 'net.sf.proguard:proguard-gradle:6.1.0' | ||
classpath 'gradle.plugin.com.github.spotbugs:spotbugs-gradle-plugin:2.0.0' | ||
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7.1' | ||
} | ||
} | ||
|
||
subprojects { | ||
apply plugin: 'java' | ||
apply plugin: 'net.ltgt.apt' | ||
apply plugin: 'checkstyle' | ||
apply plugin: 'pmd' | ||
apply plugin: 'eclipse' | ||
apply plugin: 'idea' | ||
apply plugin: 'findbugs' | ||
apply plugin: 'com.github.spotbugs' | ||
apply plugin: 'jacoco' | ||
apply plugin: 'org.sonarqube' | ||
|
||
sourceCompatibility = 1.7 | ||
sourceCompatibility = 1.8 | ||
|
||
ext { | ||
privkeyid = '99' | ||
privkeyfile = "$rootDir/config/priv_key" | ||
pubkeyfile = "$rootDir/config/pub_key" | ||
mxtfile = "${project(':core').distsDir}/${rootProject.name}.mxt" | ||
mxtfile = "${project(':core').buildDir}/${project(':core').distsDirName}/${rootProject.name}-v${getConfigValueForKey("module_build")}.mxt" | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
flatDir dirs: "$rootDir/lib" | ||
} | ||
|
||
findbugs { | ||
spotbugs { | ||
toolVersion = "3.1.12" | ||
effort = "max" | ||
reportLevel = "medium" | ||
excludeFilter file("$rootDir/config/spotbugs-exclude.xml") | ||
} | ||
|
||
tasks.withType(FindBugs) { | ||
tasks.withType(com.github.spotbugs.SpotBugsTask) { | ||
reports { | ||
xml.enabled = false | ||
html.enabled = true | ||
} | ||
} | ||
|
||
jacoco { | ||
toolVersion = "0.8.3" | ||
} | ||
|
||
task checkstyleHtml(dependsOn: checkstyleMain) { | ||
if (checkstyleMain.reports.xml.destination.exists()) { | ||
ant.xslt(in: checkstyleMain.reports.xml.destination, | ||
style: file("$rootDir/config/checkstyle-noframes-sorted.xsl"), | ||
style: file("$rootDir/config/checkstyle/checkstyle-noframes-sorted.xsl"), | ||
out: new File(checkstyleMain.reports.xml.destination.parent as String, 'main.html')) | ||
} | ||
} | ||
|
||
checkstyleMain.finalizedBy checkstyleHtml | ||
|
||
pmd { | ||
toolVersion = "6.14.0" | ||
sourceSets = [sourceSets.main] | ||
ruleSetFiles = files('config/ruleSet.xml') | ||
ruleSets = [] | ||
ruleSetFiles = files("$rootDir/config/pmd-ruleSet.xml") | ||
} | ||
|
||
sonarqube { | ||
properties { | ||
property "sonar.host.url", "https://sonarcloud.io" | ||
property "sonar.organization", "${rootProject.name}" | ||
} | ||
} | ||
} | ||
|
||
task createLibs(type: Exec) { | ||
description 'Generates patched libraries from trusted source' | ||
commandLine 'sh', 'config/create_libs.sh' | ||
} | ||
|
||
String getCurrentTimestamp() { | ||
Date today = new Date() | ||
SimpleDateFormat df = new SimpleDateFormat('yyyy-MM-dd HH:mm:ss') | ||
return df.format(today) | ||
} | ||
|
||
String getConfigValueForKey(String key) { | ||
file("${project(':core').projectDir}/src/main/resources/com/moneydance/modules/features/paypalimporter/meta_info.dict").withInputStream { | ||
final Configuration config = new PropertiesConfiguration(); | ||
config.load(it); | ||
return config.getString("\"" + key + "\"").replaceAll("^\"|\"\$", ""); | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
^// PayPal Importer for Moneydance - http://my-flow.github.io/paypalimporter/$ | ||
^// Copyright \(C\) 2013\-2018 Florian J\. Breunig\. All rights reserved\.$ | ||
^// Copyright \(C\) 2013\-2019 Florian J\. Breunig\. All rights reserved\.$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
name="Android Application Rules" | ||
xmlns="http://pmd.sf.net/ruleset/1.0.0" | ||
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd" | ||
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 | ||
http://pmd.sf.net/ruleset_xml_schema.xsd" > | ||
|
||
<description>Custom Java Rule in PMD</description> | ||
|
||
<rule ref="category/java/bestpractices.xml"> | ||
<exclude name="GuardLogStatement" /> | ||
<exclude name="UseVarargs" /> | ||
</rule> | ||
|
||
<rule ref="category/java/codestyle.xml"> | ||
<exclude name="AtLeastOneConstructor" /> | ||
<exclude name="AvoidFinalLocalVariable" /> | ||
<exclude name="CommentDefaultAccessModifier" /> | ||
<exclude name="DefaultPackage" /> | ||
<exclude name="LocalVariableCouldBeFinal" /> | ||
<exclude name="LongVariable" /> | ||
<exclude name="OnlyOneReturn" /> | ||
<exclude name="ShortClassName" /> | ||
</rule> | ||
|
||
<rule ref="category/java/design.xml"> | ||
<exclude name="AvoidCatchingGenericException" /> | ||
<exclude name="CyclomaticComplexity" /> | ||
<exclude name="DataClass" /> | ||
<exclude name="ExcessiveImports" /> | ||
<exclude name="ExcessiveMethodLength" /> | ||
<exclude name="LawOfDemeter" /> | ||
<exclude name="LoosePackageCoupling" /> | ||
<exclude name="NPathComplexity" /> | ||
<exclude name="TooManyFields" /> | ||
<exclude name="TooManyMethods" /> | ||
</rule> | ||
|
||
<rule ref="category/java/documentation.xml"> | ||
<exclude name="CommentRequired" /> | ||
<exclude name="CommentSize" /> | ||
</rule> | ||
|
||
<rule ref="category/java/errorprone.xml" > | ||
<exclude name="AvoidCatchingThrowable" /> | ||
<exclude name="AvoidDuplicateLiterals" /> | ||
<exclude name="BeanMembersShouldSerialize" /> | ||
<exclude name="DataflowAnomalyAnalysis" /> | ||
<exclude name="NullAssignment" /> | ||
<exclude name="UseProperClassLoader" /> | ||
</rule> | ||
|
||
<rule ref="category/java/multithreading.xml"> | ||
<exclude name="AvoidSynchronizedAtMethodLevel" /> | ||
</rule> | ||
|
||
<rule ref="category/java/performance.xml" /> | ||
|
||
<rule ref="category/java/security.xml" /> | ||
|
||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<FindBugsFilter> | ||
<Match> | ||
<Or> | ||
<Class name="~.*Factory"/> | ||
<Class name="~.*Dagger.*Component.*"/> | ||
</Or> | ||
</Match> | ||
<Match> | ||
<Or> | ||
<Bug pattern="EXS_EXCEPTION_SOFTENING_NO_CONSTRAINTS"/> | ||
<Bug pattern="FCCD_FIND_CLASS_CIRCULAR_DEPENDENCY"/> | ||
<Bug pattern="FII_USE_METHOD_REFERENCE"/> | ||
<Bug pattern="IMC_IMMATURE_CLASS_PRINTSTACKTRACE"/> | ||
<Bug pattern="S508C_SET_COMP_COLOR"/> | ||
</Or> | ||
</Match> | ||
</FindBugsFilter> |
Oops, something went wrong.