Skip to content

Commit

Permalink
Merge branch 'release/v.3.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
schnatterer committed Jun 19, 2016
2 parents 0a37cb5 + 7ba7156 commit b5cb7ea
Show file tree
Hide file tree
Showing 163 changed files with 9,993 additions and 10,128 deletions.
23 changes: 22 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,25 @@ local.properties
/Nusic/assets/CHANGELOG.html
/Nusic/assets/NOTICE.html
/target
project.properties
project.properties

##Gradle

.gradle
build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Cache of project
.gradletasknamecache

# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties

## Android Studio/IntelliJ
.idea
*.iml
37 changes: 21 additions & 16 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,85 +1,90 @@
nusic Changelog
=========

**v.2.1.1**
**v.3.0.0** - 2016/06/19

* Updated android support libraries - fixing errors for legacy android versions
* Technical reconstructions (maven -> gradle)

**v.2.1.1** - 2016/06/01

* Android 6: Request Read Media Permissions at Run Time


**v.2.1.0**
**v.2.1.0** - 2016/01/03

* Improvements for android 6
* Clean up old log files in order to preserve storage on device


**v.2.0.0**
**v.2.0.0** - 2015/06/30

* Introduced material design
* Restructured preferences, added developer preferences
* Implemented possibility to send log files via email
* Completely restructured app under the hood, in order to allow for better maintainability in the future


**v.1.0.2**
**v.1.0.2** - 2015/05/20

* Fixed recurring release date notification

**v.1.0.1**
**v.1.0.1** - 2014/11/25

* Fixed a possible error when displaying notification about new releases, caused during image loading

**v.1.0 Cover art and notifications**
**v.1.0 Cover art and notifications** - 2014/10/04

* Feature: Now showing cover art from Cover Art Archive
* Feautre: Get notified on the day of a release
* Added changelog, licenses, privacy policy as well as links to GitHub and Google Play and an email contact to preferences.
* Added welcome screen for new users and new versions
* Multiple minor enhancements/fixes

**v.0.6 New Tabs & UTC Fix**
**v.0.6 New Tabs & UTC Fix** - 2014/10/04

* New Tabs for available and announced releases
* Bugfixes (Wrong release dates when changing timezones, error on daily refresh of releases)

**v.0.5.1 Encryption and fixes**
**v.0.5.1 Encryption and fixes** - 2014/05/29

* Fixed an exception when hiding releases
* Fixed issue #1
* Enabled encryption (HTTPS) for communication with MusicBrainz

**v.0.5 Several minor enhancements**
**v.0.5 Several minor enhancements** - 2014/05/10

* Added back button to action bar in preferences menu
* Implemented swiping between tabs
* Removed error notification when update failed for some artists

**v.0.4 Hide albums**
**v.0.4 Hide albums** - 2014/02/03

* Possibility to hide a single album or all ablums by a specific artist by long tapping an album.
* Hidden albums can be reset in the preferences.

**v.0.3.1 Android 2.x**
**v.0.3.1 Android 2.x** - 2014/01/08

* Fix: App did not start on Android 2.x devices.

**v.0.3 Android 4.4**
**v.0.3 Android 4.4** - 2013/11/28

* Fix: artists could not be read in Android 4.4

**v.0.2.2 Changed default values**
**v.0.2.2 Changed default values** - 2013/10/20

* Prepared launch on Google Play.
* Mobile internet is now used by default in order to avoid unexpected behavior by default.

**v.0.2.1: Bugfix: Duplicated releases**
**v.0.2.1: Bugfix: Duplicated releases** - 2013/10/17

* Fixed an issue where one release could appear several times.

**v.0.2: Improvements for background task**
**v.0.2: Improvements for background task** - 2013/10/15

* Minor improvements, especially regarding background service that keeps releases up-to-date

**v.0.1: First "official" version**
**v.0.1: First "official" version** - 2013/09/01

* Checks for new album releases for all artists on phone using MusicBrainz
* Releases are displayed in two tabs: "Recently added" (within the last two weeks) and "All"
Expand Down
8 changes: 2 additions & 6 deletions NOTICE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
nusic - you new music
=========
Copyright 2014 Johannes Schnatterer.
Copyright 2016 Johannes Schnatterer.
Published under GNU General Public License (GPL), Version 3.0


Expand All @@ -14,10 +14,6 @@ published under The Apache Software License, Version 2.0
published under The Apache Software License, Version 2.0
[Website](https://github.com/roboguice/roboguice)

**roboguice-sherlock**
published under The Apache Software License, Version 2.0
[Website](https://github.com/rtyley/roboguice-sherlock)

**musicbrainzws2-java**
published under GNU General Public License (GPL), Version 3.0
[Website](https://code.google.com/p/musicbrainzws2-java/)
Expand All @@ -35,7 +31,7 @@ published under MIT License, Version 2.0
[Website](http://www.slf4j.org/)

**logback-android**
published under GNU Lesser General Public License version 2.1
published under GNU Lesser General Public License version 2.1
[Website](http://tony19.github.io/logback-android/)

**Apache Commons IO**
Expand Down
143 changes: 101 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
nusic - your new music
=====
| Branch | Build Status |
| ------------- |------------- |
| Develop | [![Build Status Develop](https://jenkins.schnatterer.info/job/nusic-develop/badge/icon)](https://jenkins.schnatterer.info/job/nusic-develop/) |
| Features | [![Build Status Develop](https://jenkins.schnatterer.info/job/nusic-features/badge/icon)](https://jenkins.schnatterer.info/job/nusic-features/) |
| Branch | Build Status | Quality Gate |
| ------------- |------------- | ------------ |
| Develop | [![Build Status Develop](https://jenkins.schnatterer.info/job/nusic-develop/badge/icon)](https://jenkins.schnatterer.info/job/nusic-develop/) |[![Quality Gates Develop](https://sonarqube.schnatterer.info/api/badges/gate?key=info.schnatterer.nusic:nusic-develop)](https://sonarqube.schnatterer.info/dashboard/index/279?did=1) |
| Features | [![Build Status Features](https://jenkins.schnatterer.info/job/nusic-features/badge/icon)](https://jenkins.schnatterer.info/job/nusic-features/) | |


Never again miss a new album release of your favorite artists - always stay informed by nusic.
Expand All @@ -28,16 +28,25 @@ You can download the lates version as APK from [GitHub] (https://github.com/schn
Copyright © 2013 Johannes Schnatterer.

Licensed under the GNU General Public License Version 3.
See the [License](https://github.com/schnatterer/nusic/blob/master/Nusic/LICENSE.txt) and the [licenses of dependencies](https://github.com/schnatterer/nusic/blob/master/Nusic/NOTICE.txt).
See the [License](LICENSE.txt) and the [licenses of dependencies](NOTICE.md).

## Release notes
See [Releases] (https://github.com/schnatterer/nusic/releases).
See [Changelog](CHANGELOG.md) and [Releases] (https://github.com/schnatterer/nusic/releases).

## Permissions
What kind of permission does nusic require and why does it require them?
- Network communication, full network access: Check MusicBrainz for new releases
- Nework communication, view network connections: Get notified about available connection to the internet in order to start checking for new releases.
- Yor applications information, run at startup: Schedule regular checking for new releases via the Android alarm manager
- System tools, test access to protected storage: Get the artists that are stored on the device
- Affects Battery, prevent phone from sleeping: Prevent the device from falling back to sleep while searching for new releases


## Build
### Modules
| Module | Packaging | Description |
| ------------- | ------------- | ------------- |
| parent | pom | Global build properties for all modules |
| parent | - | Global build properties for all modules |
| nusic-apk | apk | Assembly maven module containing the guice module, wires up all dependencies and builds the APK |
| nusic-ui-android | aar | Contains all android specific frontend-code |
| nusic-core-api | jar | Interfaces of the central logic module |
Expand All @@ -47,40 +56,90 @@ See [Releases] (https://github.com/schnatterer/nusic/releases).
| nusic-domain | jar | Domain objects for persistence and migration between the layers |
| nusic-util | jar | Utility module, containing logic common to all modules |

### Maven
In order to build the APK use the [SDK manager](https://developer.android.com/tools/help/sdk-manager.html) to download the SDK Version specified in the [parent POM's properties](https://github.com/schnatterer/nusic/blob/develop/pom.xml) and deploy android to your local maven repo using [maven-android-sdk-deployer](https://github.com/mosabua/maven-android-sdk-deployer). Also make sure to set your `ANDROID_HOME` environment variable to `sdk` folder of your Android SDK.
Then just run
mvn install
Or if you want to deploy to your devices (vie ADB):
mvn install android:deploy android:run

Note: During the build, the APK is signed using a keystore. In order not to hard-code any credentials, it uses variables.
You could pass those via the command line or define them in your ~/.m2/settings.xml like so:
```xml
<profile>
<id>keystore</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<sign.keystore>FULL/path/to/keystore</sign.keystore>
<sign.alias>the key's alias within the keystore</sign.alias>
<sign.keypass>password for keystore</sign.keypass>
<sign.storepass>password for key</sign.storepass>
</properties>
</profile>
### Gradle
In order to build the APK use the [SDK manager](https://developer.android.com/tools/help/sdk-manager.html) to download the SDK Version specified in the [parent project's build.gradle](build.gradle) and deploy android to your local maven repo using [maven-android-sdk-deployer](https://github.com/mosabua/maven-android-sdk-deployer). Also make sure to set your `ANDROID_HOME` environment variable to `sdk` folder of your Android SDK.
Then just run
```sh
gradle clean check assembleDebug
```
to compile from scratch, run the tests and create a debug-signed APK, or run

### Eclipse
* When using [m2eclipse](http://eclipse.org/m2e/) and [m2e-android](http://rgladwell.github.io/m2e-android/) and have your local maven repo set up (see above), maven and m2e should set you up with all you need to build an run right away.
* For setting up android libs, add nuisc-ui-android as library to nusic-apk and android-support-v7-appcompat from ANDROID_HOME/extras/android/support/v7/appcompat.
* In order to be able to use RoboBlender properly, add a source folder that points to `target/generated-sources/annotations` to each android-module (nusic-data-android, nusic-core-android, nusic-ui-android). Not doing this will most likely result in a `java.lang.ClassNotFoundException: AnnotationDatabaseImpl` when starting the app.
* For running robolectric tests from eclipse, you need to add the robolectric libraries (robolectric*.jar and android_all*.jar) to the modules (e.g. nusic-data-android). Those have been removed from the maven build of m2e because m2e doesn't know about scopes and and adding android_all*.jar to the APK will dramatically slow down the eclipse build or even fail it (exceed the 65K limit).

## Permissions
What kind of permission does nusic require and why does it require them?
- Network communication, full network access: Check MusicBrainz for new releases
- Nework communication, view network connections: Get notified about available connection to the internet in order to start checking for new releases.
- Yor applications information, run at startup: Schedule regular checking for new releases via the Android alarm manager
- System tools, test access to protected storage: Get the artists that are stored on the device
- Affects Battery, prevent phone from sleeping: Prevent the device from falling back to sleep while searching for new releases
```sh
gradle clean check assembleRelease
```
to create a signed APK, using an custom keystore.

For passing the credentials for this keystore via the command line there are four options

1. Define them in your `~/.gradle/gradle.properties` like so

```ini
signKeystore=FULL/path/to/keystore
signAlias=the key's alias within the keystore
signKeypass=password for keystore
signStorepasss=password for key
```
2. Pass them as command line properties, e.g.
```sh
gradle clean check assembleRelease -PsignAlias="the key's alias within the keystore"
```
3. Pass them as environment variables, e.g.
```sh
export ORG_GRADLE_PROJECT_signAlias=the key's alias within the keystore
```
4. or pass them as system property, e.g.
```sh
gradle clean check assembleRelease -Dorg.gradle.project.signKeystore=signAlias="the key's alias within the keystore"
```
## Creating a release
TODO Automate this, e.g. via Jenkins
- Start release
```sh
git-flow release start v.2.1.1
```
- Set Version
```sh
gradle setVersion -PnewVersion=2.1.1
```
- Update [changelog](CHANGELOG.md)
- Commit
```sh
git add .
git commit -m 'Prepare release v.2.1.1'
```
- Finish release & Tag (+ tag message)
```sh
git-flow release finish v.2.1.1
```
- Set next dev version & commit
```sh
gradle setVersion -PnewVersion=2.1.2-SNAPSHOT
git add .
git commit -m "Prepare for next development iteration v.2.1.2-SNAPSHOT"
```
- Checkout and build tag
```sh
git checkout tags/v.2.1.1
gradle clean check assembleRelease
```
- Push all branches & tags
```sh
git push --all
git push --tags
```
- Upload artifact: [Github](https://github.com/schnatterer/nusic/releases), [Google Play](https://play.google.com/apps/publish/)
- Add changelog to github release page: https://github.com/schnatterer/nusic/releases/tag/v.2.1.1
- Add changelog to google play entry
12 changes: 10 additions & 2 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
TODOs - Features, enhancements, refactoring, ...

- Move to gradle and AndroidStudio

- SonarQube (replace tabs by spaces, ...)
- Gradle: Dont repeat yourself - Set common compileJava, android and sonarqube (for android) options only once
See e.g https://discuss.gradle.org/t/how-do-i-detect-if-a-sub-project-has-applied-a-given-plugin-e-g-jar-or-war/4974

- Set TargetSDK to 24 and test on emu
https://developer.android.com/preview/api-overview.html
- Use newest build tools version, as soon as openshift updates GLIBC to GLIBC_2.14 needed by aapt (test with "ldd --version")

- Specify which files to backup in manifest: https://developer.android.com/training/backup/autosyncapi.html

- SonarQube
- Fix Javadoc warnings

- A new view that shows icon of the release and a link to MB on tap ? --> Remove webview
Expand Down
Loading

0 comments on commit b5cb7ea

Please sign in to comment.