Skip to content

Commit

Permalink
Updated project using AndroidX
Browse files Browse the repository at this point in the history
  • Loading branch information
mauriciotogneri committed Aug 23, 2020
1 parent f4e1d9a commit e6c636d
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 28 deletions.
23 changes: 14 additions & 9 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,23 @@ apply plugin: 'com.android.application'

android
{
compileSdkVersion 28
buildToolsVersion '28.0.3'
compileSdkVersion 30
buildToolsVersion '30.0.2'

dexOptions
{
javaMaxHeapSize '2g'
preDexLibraries true
}

defaultConfig
{
applicationId 'com.mauriciotogneri.greencoffeeexample'
minSdkVersion 14
targetSdkVersion 27
targetSdkVersion 30
versionCode 1
versionName '3.3.0'
testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
versionName '4.0.0'
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}

compileOptions
Expand All @@ -27,12 +28,16 @@ android
}
}

ext
{
espresso = '3.2.0'
}

dependencies
{
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'androidx.appcompat:appcompat:1.2.0'

androidTestImplementation 'com.android.support:support-annotations:28.0.0'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test:rules:1.0.2'
androidTestImplementation 'com.mauriciotogneri:greencoffee:3.5.0'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test:rules:1.2.0'
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.mauriciotogneri.greencoffeeexample.test.features;

import android.support.test.rule.ActivityTestRule;

import com.mauriciotogneri.greencoffee.GreenCoffeeConfig;
import com.mauriciotogneri.greencoffee.GreenCoffeeTest;
import com.mauriciotogneri.greencoffee.ScenarioConfig;
Expand All @@ -19,6 +17,7 @@

import java.io.IOException;

import androidx.test.rule.ActivityTestRule;
import static com.mauriciotogneri.greencoffeeexample.test.TestSuite.ENGLISH;
import static com.mauriciotogneri.greencoffeeexample.test.TestSuite.SPANISH;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.mauriciotogneri.greencoffeeexample.test.features;

import android.support.test.rule.ActivityTestRule;

import com.mauriciotogneri.greencoffee.GreenCoffeeConfig;
import com.mauriciotogneri.greencoffee.GreenCoffeeTest;
import com.mauriciotogneri.greencoffee.ScenarioConfig;
Expand All @@ -19,6 +17,7 @@

import java.io.IOException;

import androidx.test.rule.ActivityTestRule;
import static com.mauriciotogneri.greencoffeeexample.test.TestSuite.ENGLISH;
import static com.mauriciotogneri.greencoffeeexample.test.TestSuite.SPANISH;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.mauriciotogneri.greencoffeeexample.test.features;

import android.support.test.rule.ActivityTestRule;

import com.mauriciotogneri.greencoffee.GreenCoffeeConfig;
import com.mauriciotogneri.greencoffee.GreenCoffeeTest;
import com.mauriciotogneri.greencoffee.Scenario;
Expand All @@ -20,6 +18,7 @@
import java.io.IOException;
import java.util.Locale;

import androidx.test.rule.ActivityTestRule;
import static com.mauriciotogneri.greencoffeeexample.test.TestSuite.ENGLISH;
import static com.mauriciotogneri.greencoffeeexample.test.TestSuite.SPANISH;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.mauriciotogneri.greencoffeeexample.test.steps;

import android.support.test.InstrumentationRegistry;

import com.mauriciotogneri.greencoffee.GreenCoffeeSteps;
import com.mauriciotogneri.greencoffee.annotations.Then;

import java.io.File;

import androidx.test.InstrumentationRegistry;

public class ScreenshotSteps extends GreenCoffeeSteps
{
@Then("^I take a screenshot named '(\\w+)'$")
Expand Down
5 changes: 2 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
package="com.mauriciotogneri.greencoffeeexample"
xmlns:android="http://schemas.android.com/apk/res/android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mauriciotogneri.greencoffeeexample">

<uses-permission android:name="android.permission.CALL_PHONE" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ListView;
import android.widget.TextView;
Expand All @@ -15,6 +14,8 @@

import java.util.List;

import androidx.appcompat.app.AppCompatActivity;

public class ContactListActivity extends AppCompatActivity
{
private static final String PARAMETER_USERNAME = "parameter.username";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;

import com.mauriciotogneri.greencoffeeexample.R;
import com.mauriciotogneri.greencoffeeexample.database.ContactDatabase;
import com.mauriciotogneri.greencoffeeexample.model.Contact;

import androidx.appcompat.app.AppCompatActivity;

public class DetailsActivity extends AppCompatActivity
{
private static final String PARAMETER_CONTACT_ID = "parameter.contact.id";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
package com.mauriciotogneri.greencoffeeexample.activities;

import android.os.Bundle;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.widget.EditText;

import com.mauriciotogneri.greencoffeeexample.R;
import com.mauriciotogneri.greencoffeeexample.database.UserDatabase;

import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;

public class LoginActivity extends AppCompatActivity
{
@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.mauriciotogneri.greencoffeeexample.adapters;

import android.content.Context;
import android.support.annotation.NonNull;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand All @@ -13,6 +12,8 @@

import java.util.List;

import androidx.annotation.NonNull;

public class ContactAdapter extends ArrayAdapter<Contact>
{
private final LayoutInflater layoutInflater;
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript

dependencies
{
classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'com.android.tools.build:gradle:4.0.1'
}
}

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 @@
#Mon Sep 24 21:31:11 CEST 2018
#Sun Aug 23 16:15:39 CEST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip

0 comments on commit e6c636d

Please sign in to comment.