Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General fixes #1

Merged
merged 5 commits into from Jun 18, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions app/build.gradle
Expand Up @@ -6,7 +6,7 @@ buildscript {

}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
classpath 'com.android.tools.build:gradle:0.11.0'
classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.+'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.+'
}
Expand All @@ -31,7 +31,7 @@ def versionBuild = 0 // bump for dogfood builds, public betas, etc.

android {
compileSdkVersion 19
buildToolsVersion "19.0.3"
buildToolsVersion "19.1.0"

defaultConfig {
versionCode versionMajor * 10000 + versionMinor * 1000 + versionPatch * 100 + versionBuild
Expand Down Expand Up @@ -81,6 +81,8 @@ android {
dependencies {
compile project(':lib')

compile 'com.squareup.okhttp:okhttp:1.6.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:1.6.0'
compile 'com.squareup.picasso:picasso:2.+'
compile 'nl.qbusict:cupboard:2.+'
compile 'com.crashlytics.android:crashlytics:1.+'
Expand Down
Expand Up @@ -16,13 +16,13 @@

package app.philm.in.util;

import com.google.common.base.Preconditions;

import android.os.Handler;
import android.os.Looper;
import android.os.Process;
import android.util.Log;

import com.google.common.base.Preconditions;

import java.util.concurrent.ExecutorService;

import app.philm.in.Constants;
Expand Down Expand Up @@ -115,7 +115,7 @@ public void run() {
} catch (RetrofitError re) {
retrofitError = re;
if (Constants.DEBUG) {
Log.d(getClass().getSimpleName(), "Error while completing network call", re);
Log.d(((Object) this).getClass().getSimpleName(), "Error while completing network call", re);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious to know the reason for this change. It was necesary? I don't think that this change improve readability.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because Android Studion was raising an error while I'm looking around the codes. And I found a similar problem on stackoverflow and fixed it according to the accepted answer there.

I think it is a bug in Android Studio. As we know, Android Studio is based on the IntelliJ Platform and the existing functionality of IntelliJ IDEA Community Edition.

Google has developed it in cooperation with JetBrains. And same bug is reported to happen in IntelliJ as well. Have a look at the Error report

However a workaround to this issue is:

Casting the getClass() call to Object as follows:

((Object) this).getClass()

}
}

Expand Down
7 changes: 4 additions & 3 deletions lib/build.gradle
Expand Up @@ -4,7 +4,7 @@ buildscript {

}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
classpath 'com.android.tools.build:gradle:0.11.0'
}
}

Expand All @@ -16,7 +16,7 @@ repositories {

android {
compileSdkVersion 19
buildToolsVersion "19.0.3"
buildToolsVersion "19.1.0"

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
Expand All @@ -31,7 +31,8 @@ android {
}

dependencies {
compile 'com.squareup.okhttp:okhttp:1.5.+'
compile 'com.squareup.okhttp:okhttp:1.6.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:1.6.0'
compile 'com.squareup.retrofit:retrofit:1.4.+'
compile 'com.squareup:otto:1.3.+'
compile 'com.squareup.dagger:dagger:1.+'
Expand Down