Skip to content
This repository has been archived by the owner on May 7, 2019. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
; Conflicts:
;	README.md
  • Loading branch information
ayltai committed May 22, 2018
2 parents c4dd184 + e62232c commit 4ed7e54
Show file tree
Hide file tree
Showing 145 changed files with 1,688 additions and 1,560 deletions.
33 changes: 32 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ references:
persist_to_workspace:
root: *workspace
paths:
- mobile/build/intermediates
- mobile/build/outputs/androidTest-results
- mobile/build/outputs/apk
- mobile/build/outputs/code-coverage
Expand Down Expand Up @@ -162,6 +163,30 @@ jobs:
path: mobile/build/outputs/mapping/
destination: /mapping/

## Check code quality

check_quality:
<<: *android_config
steps:
- checkout
- *restore_cache
- run:
name: Download dependencies
command: ./gradlew androidDependencies
- *save_cache
- *export_gservices_key
- *decode_gservices_key
- run:
name: Run Checkstyle
command: ./gradlew -PciBuild=true :mobile:customCheckstyle
- run:
name: Run FindBugs
command: ./gradlew -PciBuild=true :mobile:customFindBugs
- *persist_debug_workspace
- store_artifacts:
path: mobile/build/reports/
destination: /reports/

## Run unit tests

test_unit:
Expand Down Expand Up @@ -267,7 +292,12 @@ workflows:
jobs:
- build_debug
- build_release
- test_unit
- check_quality:
requires:
- build_debug
- test_unit:
requires:
- build_debug
- test_instrumented:
requires:
- build_debug
Expand All @@ -282,5 +312,6 @@ workflows:
- master
requires:
- build_release
- check_quality
- test_unit
- test_instrumented
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ Temporary Items
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

.idea/caches/**

# User-specific stuff:
.idea/*.xml
.idea/*/*.xml
Expand Down
23 changes: 0 additions & 23 deletions .idea/compiler.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/encodings.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/modules.xml

This file was deleted.

12 changes: 0 additions & 12 deletions .idea/runConfigurations.xml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

  Copyright 2016-2017 Alan Tai
  Copyright 2016-2018 Alan Tai

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
Newspaper
=========

[![Release](https://img.shields.io/github/release/ayltai/Newspaper.svg?label=release&maxAge=1800)](https://1468-77390316-gh.circle-artifacts.com/0/apk/release/mobile-release.apk) [![Build Status](https://circleci.com/gh/ayltai/Newspaper.svg?style=shield)](https://circleci.com/gh/ayltai/Newspaper) [![Code Quality](https://api.codacy.com/project/badge/Grade/89d745ac9331474e9cf9f3203782a72f)](https://www.codacy.com/app/ayltai/Newspaper?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=ayltai/Newspaper&amp;utm_campaign=Badge_Grade) [![Code Coverage](https://api.codacy.com/project/badge/Coverage/89d745ac9331474e9cf9f3203782a72f)](https://www.codacy.com/app/ayltai/Newspaper?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=ayltai/Newspaper&amp;utm_campaign=Badge_Coverage) [![Code Coverage](https://codecov.io/gh/ayltai/Newspaper/branch/master/graph/badge.svg)](https://codecov.io/gh/ayltai/Newspaper) [![Android API](https://img.shields.io/badge/API-16%2B-blue.svg?style=flat&label=API&maxAge=300)](https://www.android.com/history/) [![License](https://img.shields.io/badge/License-apache%202.0-blue.svg?label=license&maxAge=1800)](https://github.com/ayltai/Newspaper/blob/master/LICENSE)
[![Release](https://img.shields.io/github/release/ayltai/Newspaper.svg?label=release&maxAge=1800)](https://1677-77390316-gh.circle-artifacts.com/0/apk/release/mobile-release.apk) [![Build Status](https://circleci.com/gh/ayltai/Newspaper.svg?style=shield)](https://circleci.com/gh/ayltai/Newspaper) [![Code Quality](https://api.codacy.com/project/badge/Grade/89d745ac9331474e9cf9f3203782a72f)](https://www.codacy.com/app/ayltai/Newspaper?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=ayltai/Newspaper&amp;utm_campaign=Badge_Grade) [![Code Coverage](https://api.codacy.com/project/badge/Coverage/89d745ac9331474e9cf9f3203782a72f)](https://www.codacy.com/app/ayltai/Newspaper?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=ayltai/Newspaper&amp;utm_campaign=Badge_Coverage) [![Code Coverage](https://codecov.io/gh/ayltai/Newspaper/branch/master/graph/badge.svg)](https://codecov.io/gh/ayltai/Newspaper) [![Android API](https://img.shields.io/badge/API-16%2B-blue.svg?style=flat&label=API&maxAge=300)](https://www.android.com/history/) [![License](https://img.shields.io/badge/License-apache%202.0-blue.svg?label=license&maxAge=1800)](https://github.com/ayltai/Newspaper/blob/master/LICENSE)

An aggregated news app containing news from 10+ local news publishers in Hong Kong. Made with ❤

![Screenshot (Compact)](design/screenshot_cozy_framed.png "Screenshot (Cozy)") ![Screenshot (Dark)](design/screenshot_dark_framed.png "Screenshot (Dark)")
![Screenshot (Compact)](design/screenshot_cozy_framed.png "Screenshot (Cozy)") ![Screenshot (Dark)](design/screenshot_dark_framed.png "Screenshot (Dark)") ![Screenshot (Details)](design/screenshot_details_framed.png "Screenshot (Details)")

## Features
* Fast. Just fast.
* Support video news
* Auto face centering image cropping
* Optional panoramic images
* Analyze news contents using [Natural Language Processing](https://en.wikipedia.org/wiki/Natural-language_processing)
* Read news from 10 local news publishers
* Bookmarks and reading history
* No ads. We hate ads as much as you do
Expand Down Expand Up @@ -53,7 +53,6 @@ This app is made with the support of open source projects:
* [BigImageViewer](https://github.com/Piasy/BigImageViewer)
* [RecyclerView Animators](https://github.com/wasabeef/recyclerview-animators)
* [KenBurnsView](https://github.com/flavioarfaria/KenBurnsView)
* [PanoramaImageView](https://github.com/gjiazhe/PanoramaImageView)
* [ExoPlayer](https://github.com/google/ExoPlayer)
* [ShimmerLayout](https://github.com/team-supercharge/ShimmerLayout)
* [SmallBang](https://github.com/hanks-zyh/SmallBang)
Expand All @@ -74,9 +73,8 @@ This app is made with the support of open source projects:
* [Google Mobile Vision](https://developers.google.com/vision/face-detection-concepts)
* [Firebase Analytics](https://firebase.google.com/docs/analytics)
* [Firebase Remote Config](https://firebase.google.com/docs/remote-config)
* [Firebase Performance Monitoring](https://firebase.google.com/docs/perf-mon)
* [Firebase Test Lab](https://firebase.google.com/docs/test-lab)
* [CircleCI](https://circleci.com)
* [Fabric Answers](https://answers.io)
* [Fabric Crashlytics](https://fabric.io/kits/android/crashlytics)
* [Instabug](https://instabug.com)
* [TextRazor](https://www.textrazor.com)
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'io.realm:realm-gradle-plugin:4.3.4'
classpath 'com.google.gms:google-services:3.2.0'
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'io.realm:realm-gradle-plugin:5.1.0'
classpath 'com.google.gms:google-services:3.3.1'
classpath 'com.google.firebase:firebase-plugins:1.1.5'
classpath 'io.fabric.tools:gradle:1.25.1'
classpath 'org.jacoco:org.jacoco.core:0.7.9'
classpath 'io.fabric.tools:gradle:1.25.4'
classpath 'org.jacoco:org.jacoco.core:0.8.1'
}
}

Expand Down
6 changes: 2 additions & 4 deletions checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@
<module name="CyclomaticComplexity">
<property
name="max"
value="10"/>
value="12"/>
</module>
<module name="NestedForDepth">
<property
Expand All @@ -379,16 +379,14 @@
value="6"/>
</module>
<module name="IllegalThrows"/>
<module name="IllegalCatch"/>
<module name="IllegalImport"/>
<module name="MagicNumber">
<property
name="ignoreNumbers"
value="-1,0,1,2"/>
value="-1,0,0.5,1,2,10,100"/>
</module>
<module name="MissingDeprecated"/>
<module name="MissingOverride"/>
<module name="MultipleStringLiterals"/>
<module name="MutableException"/>
<module name="RedundantImport"/>
<module name="RedundantModifier"/>
Expand Down
Binary file modified design/screenshot_cozy_framed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified design/screenshot_dark_framed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added design/screenshot_details_framed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 24 additions & 4 deletions findbugs-android-exclude.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<FindBugsFilter>
<!-- http://stackoverflow.com/questions/7568579/eclipsefindbugs-exclude-filter-files-doesnt-work -->
<Match>
<Or>
<Class name="~.*\.R\$.*" />
<Class name="~.*\.Manifest\$.*" />
<Class name="~.*\.*$.*" />
<Class name="~.*Test\.*" />
<Class name="~.*R\$\.*" />
<Class name="~.*Manifest\$\.*" />
<Class name="~.*Dagger*\.*" />
<Class name="~.*Factory*\.*" />
<Package name="~io\.realm\.*" />
<Package name="~android\$.*" />
<Bug pattern="BL_BURYING_LOGIC" />
<Bug pattern="CLI_CONSTANT_LIST_INDEX" />
<Bug pattern="CSI_CHAR_SET_ISSUES_USE_STANDARD_CHARSET" />
<Bug pattern="EXS_EXCEPTION_SOFTENING_RETURN_FALSE" />
<Bug pattern="ICAST_IDIV_CAST_TO_DOUBLE" />
<Bug pattern="LSC_LITERAL_STRING_COMPARISON" />
<Bug pattern="MOM_MISLEADING_OVERLOAD_MODEL" />
<Bug pattern="NP_GUARANTEED_DEREF" />
<Bug pattern="NP_NULL_ON_SOME_PATH" />
<Bug pattern="NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE" />
<Bug pattern="NP_NULL_PARAM_DEREF" />
<Bug pattern="PATH_TRAVERSAL_IN" />
<Bug pattern="PCOA_PARTIALLY_CONSTRUCTED_OBJECT_ACCESS" />
<Bug pattern="PRMC_POSSIBLY_REDUNDANT_METHOD_CALLS" />
<Bug pattern="RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE" />
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE" />
<Bug pattern="SUA_SUSPICIOUS_UNINITIALIZED_ARRAY" />
<Bug pattern="SEO_SUBOPTIMAL_EXPRESSION_ORDER" />
<Bug pattern="PREDICTABLE_RANDOM" />
</Or>
</Match>
</FindBugsFilter>
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
org.gradle.jvmargs=-noverify -Xmx1536m
org.gradle.caching=true
org.gradle.configureondemand=true
org.gradle.parallel=false
org.gradle.daemon=false
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-bin.zip
Loading

0 comments on commit 4ed7e54

Please sign in to comment.