Skip to content
This repository has been archived by the owner on Feb 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #73 from JavaCafe01/dev
Browse files Browse the repository at this point in the history
Merge dev with master
  • Loading branch information
javacafe01 authored Dec 20, 2020
2 parents c6aedb0 + 7d6e5bd commit 7ccf9f5
Show file tree
Hide file tree
Showing 17 changed files with 294 additions and 157 deletions.
43 changes: 30 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,45 @@
language: android
jdk: oraclejdk8
sudo: required
after_failure: "cat $TRAVIS_BUILD_DIR/app/build/outputs/lint-results-debug.xml"

notifications:
slack: pdfviewerplus:ODw20YfhNtVZkbdA4K3mVFnS

before_install:
- chmod +x gradlew
env:
global:
- ANDROID_API_LEVEL=30
- ANDROID_BUILD_TOOLS_VERSION=29.0.2
- ANDROID_ABI=armeabi-v7a

android:
components:
- tools
- platform-tools
- tools
- build-tools-28.0.3
- android-21
- android-29
- sys-img-armeabi-v7a-android-21
- extra-android-m2repository
licenses:
- 'android-sdk-preview-license-52d11cd2'
- 'android-sdk-license-.+'
- 'google-gdk-license-.+'

before_install:
- touch $HOME/.android/repositories.cfg
- yes | sdkmanager "platforms;android-30"
- yes | sdkmanager "build-tools;29.0.2"

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/.android/build-cache

before_script:
# Create and start emulator
- echo no | android create avd --force -n test -t android-21 --abi armeabi-v7a
- emulator -avd test -no-skin -no-audio -no-window &
- android-wait-for-emulator
- adb shell input keyevent 82 &
- chmod +x gradlew

script: ./gradlew connectedAndroidTest
script:
- ./gradlew clean build
- ./gradlew test
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@
## Contribute

You can contribute to this project in many ways:
* Fork and make pull requests
* Help to translate the application (if so contact me --> [email protected])
* Fork and make pull requests (please target dev branch)
* Help to translate the application (By making PR)

### Special Thanks!

| Github Users |
| ------------- |
| [Fs00](https://github.com/Fs00) |
| [Etamuk](https://github.com/Etamuk) |
| [Raspbeguy](https://github.com/raspbeguy) |
| [Greynar](https://github.com/Greynar) |
Expand Down
25 changes: 14 additions & 11 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ android {
abortOnError false
}

buildToolsVersion "28.0.3"
compileSdkVersion 29
buildToolsVersion "29.0.2"
compileSdkVersion 30
defaultConfig {
applicationId "com.gsnathan.pdfviewer"
minSdkVersion 21
targetSdkVersion 29
versionCode 24
versionName "3.3"
targetSdkVersion 30
versionCode 25
versionName "3.4"
vectorDrawables.useSupportLibrary = true

javaCompileOptions {
Expand All @@ -61,17 +61,20 @@ android {

debug {
debuggable true
useProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.material:material:1.2.0-alpha05'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.3.0-beta01'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'

//Intro Library
implementation 'com.github.paolorotolo:appintro:v5.1.0'
Expand All @@ -87,8 +90,8 @@ dependencies {

//Android Annotations Library (Proguard config not needed)
//compileOnly
annotationProcessor 'org.androidannotations:androidannotations:4.5.2'
implementation 'org.androidannotations:androidannotations-api:4.5.2'
annotationProcessor 'org.androidannotations:androidannotations:4.6.0'
implementation 'org.androidannotations:androidannotations-api:4.6.0'

//License Presenter Library (Proguard config not needed)
implementation 'com.github.franmontiel:AttributionPresenter:1.0.1'
Expand Down
21 changes: 14 additions & 7 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@
<activity
android:name=".MainActivity_"
android:theme="@style/Theme.Cyanea.Light.DarkActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />

Expand Down Expand Up @@ -72,12 +67,24 @@
<data android:scheme="content" />
<data android:mimeType="application/pdf" />
</intent-filter>
</activity> <!-- About -->
</activity>
<!-- Alias to allow the user to hide the app from launcher -->
<activity-alias
android:name=".LauncherAlias"
android:enabled="true"
android:targetActivity=".MainActivity_">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias>

<activity
android:name=".AboutActivity"
android:label="About"
android:parentActivityName=".MainActivity_"
android:theme="@style/Theme.Cyanea.Light.NoActionBar">
android:theme="@style/Theme.Cyanea.Light.DarkActionBar">

<!-- The meta-data tag is required if you support API level 15 and lower -->
<meta-data
Expand Down
7 changes: 1 addition & 6 deletions app/src/main/java/com/gsnathan/pdfviewer/AboutActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ public class AboutActivity extends CyaneaAppCompatActivity {
TextView versionView; //shows the version
private final String APP_VERSION_RELEASE = "Version " + Utils.getAppVersion(); //contains Version + the version number
private final String APP_VERSION_DEBUG = "Version " + Utils.getAppVersion() + "-debug"; //contains Version + the version number + debug
private Toolbar toolbar;

@Override
protected void onCreate(Bundle savedInstanceState) {
Expand All @@ -55,17 +54,13 @@ protected void onCreate(Bundle savedInstanceState) {
}

private void setUpToolBar() {
setSupportActionBar(toolbar);
final long token = Binder.clearCallingIdentity();
Binder.clearCallingIdentity();
getSupportActionBar().setDisplayHomeAsUpEnabled(true);

}

private void initUI() {
//initialize the textview
versionView = (TextView) findViewById(R.id.versionTextView);
//initialize the toolbar
toolbar = (Toolbar) findViewById(R.id.toolbar_about);

// check if app is debug
if (BuildConfig.DEBUG) {
Expand Down
Loading

0 comments on commit 7ccf9f5

Please sign in to comment.