diff --git a/app/build.gradle b/app/build.gradle index 8aadcea..3af6d52 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,15 +1,14 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 24 - buildToolsVersion '24.0.3' - + compileSdkVersion 27 defaultConfig { - applicationId 'com.antonioleiva.androidmvp' - minSdkVersion 16 - targetSdkVersion 24 + applicationId "antonioleiva.com.test" + minSdkVersion 21 + targetSdkVersion 27 versionCode 1 - versionName '1.0' + versionName "1.0" + testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { @@ -20,6 +19,6 @@ android { } dependencies { - testCompile 'junit:junit:4.12' - testCompile 'org.mockito:mockito-core:2.0.90-beta' + testImplementation 'junit:junit:4.12' + testImplementation 'org.mockito:mockito-core:2.15.0' } diff --git a/app/src/main/java/com/antonioleiva/mvpexample/app/Login/LoginActivity.java b/app/src/main/java/com/antonioleiva/mvpexample/app/Login/LoginActivity.java index e618bb1..e07a53f 100644 --- a/app/src/main/java/com/antonioleiva/mvpexample/app/Login/LoginActivity.java +++ b/app/src/main/java/com/antonioleiva/mvpexample/app/Login/LoginActivity.java @@ -39,9 +39,9 @@ public class LoginActivity extends Activity implements LoginView, View.OnClickLi super.onCreate(savedInstanceState); setContentView(R.layout.activity_login); - progressBar = (ProgressBar) findViewById(R.id.progress); - username = (EditText) findViewById(R.id.username); - password = (EditText) findViewById(R.id.password); + progressBar = findViewById(R.id.progress); + username = findViewById(R.id.username); + password = findViewById(R.id.password); findViewById(R.id.button).setOnClickListener(this); presenter = new LoginPresenterImpl(this,new LoginInteractorImpl()); diff --git a/app/src/main/java/com/antonioleiva/mvpexample/app/main/MainActivity.java b/app/src/main/java/com/antonioleiva/mvpexample/app/main/MainActivity.java index d647d72..27e37dd 100644 --- a/app/src/main/java/com/antonioleiva/mvpexample/app/main/MainActivity.java +++ b/app/src/main/java/com/antonioleiva/mvpexample/app/main/MainActivity.java @@ -42,9 +42,9 @@ public class MainActivity extends Activity implements MainView, AdapterView.OnIt @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); - listView = (ListView) findViewById(R.id.list); + listView = findViewById(R.id.list); listView.setOnItemClickListener(this); - progressBar = (ProgressBar) findViewById(R.id.progress); + progressBar = findViewById(R.id.progress); presenter = new MainPresenterImpl(this, new FindItemsInteractorImpl()); } diff --git a/build.gradle b/build.gradle index 6f8f324..b92e5f5 100644 --- a/build.gradle +++ b/build.gradle @@ -1,14 +1,23 @@ buildscript { repositories { - mavenCentral() + google() + jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.2.2' + classpath 'com.android.tools.build:gradle:3.1.3' + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files } } allprojects { repositories { - mavenCentral() + google() + jcenter() } +} + +task clean(type: Delete) { + delete rootProject.buildDir } \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 7830870..e9a61d8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sat Jun 28 10:58:27 CEST 2014 +#Sat Jan 13 09:12:34 PST 2018 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-all.zip \ No newline at end of file