Skip to content

Commit

Permalink
move on to v1.5 and; update build/debug config
Browse files Browse the repository at this point in the history
  • Loading branch information
theScrabi committed May 7, 2018
1 parent e541561 commit 2a66267
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 25 deletions.
20 changes: 10 additions & 10 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ android {
defaultConfig {
minSdkVersion 15
targetSdkVersion 27
versionCode 5
versionName "1.4"
versionCode 6
versionName "1.5"
applicationId "org.schabi.nxbookmarks"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
Expand All @@ -32,14 +32,14 @@ android {
}

dependencies {
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:27.1.1'
compile 'com.android.support:design:27.1.1'
compile 'com.android.support:cardview-v7:27.1.1'
testCompile 'junit:junit:4.12'
compile 'org.eclipse.birt.runtime.3_7_1:org.apache.commons.codec:1.3.0'
compile 'org.jsoup:jsoup:1.11.2'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
testImplementation 'junit:junit:4.12'
implementation 'org.eclipse.birt.runtime.3_7_1:org.apache.commons.codec:1.3.0'
implementation 'org.jsoup:jsoup:1.11.2'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ protected String doInBackground(Void... params) {
try {
connector.addBookmark(bookmark);
} catch (Exception e) {
//e.printStackTrace();
if(BuildConfig.DEBUG) e.printStackTrace();
return getString(R.string.could_not_add_bookmark);
}
return null;
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/java/org/schabi/ocbookmarks/IconHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ protected Bitmap doInBackground(Void... params) {

return null;
} catch (Exception e) {
//e.printStackTrace();
if(BuildConfig.DEBUG) e.printStackTrace();
return null;
} finally {
try {
if (in != null) {
in.close();
}
} catch (Exception e) {
//e.printStackTrace();
if(BuildConfig.DEBUG) e.printStackTrace();
}
}
}
Expand Down Expand Up @@ -145,7 +145,7 @@ private void setSiteHasNoIcon(Bookmark bookmark) {
try {
iconFile.createNewFile();
} catch (Exception e) {
//e.printStackTrace();
if(BuildConfig.DEBUG) e.printStackTrace();
}
}

Expand All @@ -158,7 +158,7 @@ private void storeIcon(Bookmark bookmark, Bitmap icon) {
out = new FileOutputStream(iconFile.toString());
icon.compress(Bitmap.CompressFormat.PNG, 100, out);
} catch (Exception e) {
//e.printStackTrace();
if(BuildConfig.DEBUG) e.printStackTrace();
}
}

Expand Down
12 changes: 6 additions & 6 deletions app/src/main/java/org/schabi/ocbookmarks/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,14 @@ protected String doInBackground(Void... params) {
try {
connector.addBookmark(bookmark);
} catch (Exception e) {
//e.printStackTrace();
if(BuildConfig.DEBUG) e.printStackTrace();
return getString(R.string.could_not_add_bookmark);
}
} else {
try {
connector.editBookmark(bookmark);
} catch (Exception e) {
//e.printStackTrace();
if(BuildConfig.DEBUG) e.printStackTrace();
return getString(R.string.could_not_change_bookmark);
}
}
Expand Down Expand Up @@ -430,7 +430,7 @@ protected Bookmark[] doInBackground(Void... bla) {
storeToFile(data);
return connector.getFromRawJson(data);
} catch (Exception e) {
//e.printStackTrace();
if(BuildConfig.DEBUG) e.printStackTrace();
return null;
}
}
Expand Down Expand Up @@ -469,9 +469,9 @@ private void loadFromFile() {
mTagsFragment.updateData(Bookmark.getTagsFromBookmarks(bookmarks));
mBookmarkFragment.updateData(bookmarks);
} catch (JSONException je) {
//e.printStackTrace();
if(BuildConfig.DEBUG) je.printStackTrace();
} catch (Exception e) {
//e.printStackTrace();
if(BuildConfig.DEBUG) e.printStackTrace();
}
}
}
Expand All @@ -483,7 +483,7 @@ private void storeToFile(JSONArray data) {
jsonFile.flush();
jsonFile.close();
} catch (Exception e) {
//e.printStackTrace();
if(BuildConfig.DEBUG) e.printStackTrace();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public JSONObject send(String methode, String relativeUrl) throws RequestExcepti
private JSONObject parseJson(String methode, String url, String response) throws RequestException {

JSONObject data = null;
if(methode == "GET" && url.endsWith("/tag")) {
if(methode.equals("GET") && url.endsWith("/tag")) {
// we have to handle GET /tag different:
// https://github.com/nextcloud/bookmarks#list-all-tags
JSONArray array = null;
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'com.android.tools.build:gradle:3.1.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Nov 14 11:46:45 CET 2017
#Mon May 07 21:07:40 CEST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

0 comments on commit 2a66267

Please sign in to comment.