Skip to content

Commit

Permalink
Merge pull request #147 from flipkart-incubator/androidx
Browse files Browse the repository at this point in the history
Migrating to Android X and upgrading dependent libraries
  • Loading branch information
anirudhramanan authored Jun 3, 2019
2 parents 23688ae + 2155898 commit cfef9d0
Show file tree
Hide file tree
Showing 30 changed files with 100 additions and 93 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ android:
components:
- tools
- platform-tools
- build-tools-25.0.2
- android-25
- extra-android-support
- build-tools-28.0.3
- android-28
- extra-android-x
- extra-android-m2repository
- extra-google-m2repository
script:
Expand Down
18 changes: 9 additions & 9 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,22 @@
apply plugin: 'com.android.application'

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:design:25.1.0'
compile 'com.github.flipkart-incubator.batchman:batching:1.3.7'
compile 'com.github.flipkart-incubator.batchman:batching-gson:1.3.7'
api fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.12'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.github.flipkart-incubator.batchman:batching:1.3.7'
implementation 'com.github.flipkart-incubator.batchman:batching-gson:1.3.7'
}

android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
compileSdkVersion 28
buildToolsVersion '28.0.3'

defaultConfig {
applicationId "com.flipkart.batchdemo"
minSdkVersion 14
targetSdkVersion 25
targetSdkVersion 28
versionCode 1
versionName "1.0"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

package com.flipkart.batchdemo;

import android.support.annotation.Keep;
import androidx.annotation.Keep;

import com.flipkart.batching.core.data.Tag;
import com.flipkart.batching.core.data.TagData;
Expand Down
16 changes: 8 additions & 8 deletions app/src/main/java/com/flipkart/batchdemo/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
import android.os.Bundle;
import android.os.Handler;
import android.os.HandlerThread;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.NavigationView;
import android.support.design.widget.Snackbar;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.navigation.NavigationView;
import com.google.android.material.snackbar.Snackbar;
import androidx.core.view.GravityCompat;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.appcompat.app.ActionBarDrawerToggle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
~ THE SOFTWARE.
-->

<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
Expand All @@ -37,7 +37,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent" />

<android.support.design.widget.NavigationView
<com.google.android.material.navigation.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
Expand All @@ -46,4 +46,4 @@
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/activity_main_drawer" />

</android.support.v4.widget.DrawerLayout>
</androidx.drawerlayout.widget.DrawerLayout>
12 changes: 6 additions & 6 deletions app/src/main/res/layout/app_bar_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,36 +23,36 @@
~ THE SOFTWARE.
-->

<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="com.flipkart.batchdemo.MainActivity">

<android.support.design.widget.AppBarLayout
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">

<android.support.v7.widget.Toolbar
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />

</android.support.design.widget.AppBarLayout>
</com.google.android.material.appbar.AppBarLayout>

<include layout="@layout/content_main" />

<android.support.design.widget.FloatingActionButton
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin"
android:src="@android:drawable/ic_dialog_email" />

</android.support.design.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
21 changes: 11 additions & 10 deletions batching-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'

dependencies {
compile 'com.android.support:support-annotations:25.1.0'
testCompile 'junit:junit:4.12'
implementation 'androidx.annotation:annotation:1.0.2'
testImplementation 'junit:junit:4.12'
}

android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
compileSdkVersion 28
buildToolsVersion '28.0.3'

defaultConfig {
minSdkVersion 14
targetSdkVersion 25
targetSdkVersion 28
versionCode 1
versionName "1.3.7"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

}
buildTypes {
Expand All @@ -31,11 +31,12 @@ buildscript {
repositories {
maven { url 'http://repo1.maven.org/maven2' }
maven { url "https://plugins.gradle.org/m2/" }
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:2.2.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath "net.ltgt.gradle:gradle-errorprone-plugin:0.0.8"
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.7.5'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath "net.ltgt.gradle:gradle-errorprone-plugin:0.0.12"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

package com.flipkart.batching.core;

import android.support.annotation.Keep;
import androidx.annotation.Keep;

import java.util.Collection;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

package com.flipkart.batching.core;

import android.support.annotation.Keep;
import androidx.annotation.Keep;

import java.util.Collection;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
package com.flipkart.batching.core;


import android.support.annotation.Keep;
import androidx.annotation.Keep;

import com.flipkart.batching.core.data.Tag;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

package com.flipkart.batching.core;

import android.support.annotation.Keep;
import androidx.annotation.Keep;

import java.util.Collection;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
package com.flipkart.batching.core;


import android.support.annotation.Keep;
import androidx.annotation.Keep;

import java.io.IOException;
import java.util.Collection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.flipkart.batching.core.batch;

import android.support.annotation.Keep;
import androidx.annotation.Keep;

import com.flipkart.batching.core.BatchImpl;
import com.flipkart.batching.core.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.flipkart.batching.core.batch;

import android.support.annotation.Keep;
import androidx.annotation.Keep;

import com.flipkart.batching.core.BatchImpl;
import com.flipkart.batching.core.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.flipkart.batching.core.batch;

import android.support.annotation.Keep;
import androidx.annotation.Keep;

import com.flipkart.batching.core.Batch;
import com.flipkart.batching.core.BatchImpl;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.flipkart.batching.core.batch;

import android.support.annotation.Keep;
import androidx.annotation.Keep;

import com.flipkart.batching.core.BatchImpl;
import com.flipkart.batching.core.Data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

package com.flipkart.batching.core.data;

import android.support.annotation.Keep;
import androidx.annotation.Keep;

import com.flipkart.batching.core.Data;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

package com.flipkart.batching.core.data;

import android.support.annotation.Keep;
import androidx.annotation.Keep;

import com.flipkart.batching.core.Data;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

package com.flipkart.batching.core.data;

import android.support.annotation.Keep;
import androidx.annotation.Keep;

import com.flipkart.batching.core.Data;

Expand Down
27 changes: 14 additions & 13 deletions batching-gson/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,36 @@ buildscript {
repositories {
maven { url 'http://repo1.maven.org/maven2' }
maven { url "https://plugins.gradle.org/m2/" }
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:2.2.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.7.5'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.android.support:support-annotations:25.1.0'
compile 'com.github.flipkart-incubator.batchman:batching-core:1.3.7'
api fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'androidx.annotation:annotation:1.0.2'
implementation 'com.github.flipkart-incubator.batchman:batching-core:1.3.7'

testCompile 'junit:junit:4.12'
testCompile 'org.robolectric:robolectric:3.2.2'
testImplementation 'junit:junit:4.12'
testImplementation 'org.robolectric:robolectric:3.3.2'
}

android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
compileSdkVersion 28
buildToolsVersion '28.0.3'

defaultConfig {
minSdkVersion 14
targetSdkVersion 25
targetSdkVersion 28
versionCode 1
versionName "1.3.7"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

}
buildTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@

package com.flipkart.batching.gson;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.flipkart.batching.core.Batch;
import com.flipkart.batching.core.BatchImpl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
package com.flipkart.batching.gson.adapters;

import android.support.annotation.Nullable;
import androidx.annotation.Nullable;

import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
package com.flipkart.batching.gson.adapters;

import android.support.annotation.NonNull;
import androidx.annotation.NonNull;

import com.flipkart.batching.core.Data;
import com.flipkart.batching.core.DataCollection;
Expand Down
Loading

0 comments on commit cfef9d0

Please sign in to comment.