Skip to content

Commit

Permalink
Migrated to AndroidX
Browse files Browse the repository at this point in the history
  • Loading branch information
RationalRank committed Oct 4, 2020
1 parent e74e0ee commit fc7f456
Show file tree
Hide file tree
Showing 18 changed files with 67 additions and 63 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ It's possible to set the locale so that weekday column names are automatically s

```gradle
dependencies {
compile 'com.github.sundeepk:compact-calendar-view:3.0.0'
compile 'com.github.ZupersoftSolutions:CompactCalendarView:2.0.0'
}
```

Expand Down
7 changes: 3 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ buildscript {
google()
jcenter()
}
dependencies {
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
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
}
}

Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ POM_URL=https\://github.com/SundeepK/CompactCalendarView
POM_SCM_CONNECTION=scm\:[email protected]\:SundeepK/CompactCalendarView.git
POM_LICENCE_NAME=The MIT License (MIT)
POM_DESCRIPTION=An android library which provides a compact calender view
android.useAndroidX=true
android.enableJetifier=true
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 May 28 11:47:28 BST 2018
#Sun Oct 04 10:11:29 IST 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
18 changes: 10 additions & 8 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
apply plugin: 'com.android.library'
apply plugin: 'idea'
apply plugin: 'com.github.dcendents.android-maven'

group='com.github.ZupersoftSolutions'

idea {
module {
Expand All @@ -17,14 +20,13 @@ repositories {


android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
compileSdkVersion 29

defaultConfig {
minSdkVersion 11
targetSdkVersion 27
versionCode 1
versionName "1.0"
minSdkVersion 19
targetSdkVersion 29
versionCode 200
versionName "2.0.0"
}
buildTypes {
release {
Expand All @@ -36,9 +38,9 @@ android {

dependencies {
api fileTree(include: ['*.jar'], dir: 'libs')
api 'com.android.support:appcompat-v7:27.1.1'
api 'androidx.appcompat:appcompat:1.2.0'
//mockito dependencies
testImplementation 'junit:junit:4.12'
testImplementation 'junit:junit:4.13'
testImplementation 'org.mockito:mockito-core:2.15.0'
}

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

import android.animation.Animator;
import android.animation.ValueAnimator;
import android.support.annotation.NonNull;
import androidx.annotation.NonNull;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.view.animation.Animation;
import android.view.animation.OvershootInterpolator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Rect;
import android.support.v4.view.GestureDetectorCompat;
import androidx.core.view.GestureDetectorCompat;
import android.util.AttributeSet;
import android.view.GestureDetector;
import android.view.MotionEvent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.github.sundeepk.compactcalendarview.domain;

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

public class Event {

Expand Down
21 changes: 10 additions & 11 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.android.tools.build:gradle:4.0.1'
classpath 'com.facebook.testing.screenshot:plugin:0.6.0'
}
}
Expand All @@ -16,13 +16,12 @@ apply plugin: 'com.android.application'
apply plugin: 'com.facebook.testing.screenshot'

android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
compileSdkVersion 29

defaultConfig {
applicationId "sundeepk.github.com.sample"
minSdkVersion 16
targetSdkVersion 27
minSdkVersion 21
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "sundeepk.github.com.sample.TestRunner"
Expand All @@ -41,16 +40,16 @@ configurations.all {

dependencies {
api fileTree(include: ['*.jar'], dir: 'libs')
api 'com.android.support:appcompat-v7:27.1.1'
api 'com.android.support:support-v4:27.1.1'
api 'androidx.appcompat:appcompat:1.0.0'
api 'androidx.legacy:legacy-support-v4:1.0.0'
api project(':library')
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'com.azimolabs.conditionwatcher:conditionwatcher:0.1'
androidTestImplementation 'com.android.support.test:rules:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
androidTestImplementation 'androidx.test:rules:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
androidTestImplementation 'com.google.dexmaker:dexmaker-mockito:1.0'
androidTestImplementation 'com.google.dexmaker:dexmaker:1.0'
androidTestImplementation 'org.mockito:mockito-core:1.10.17'
androidTestImplementation 'com.android.support:support-annotations:27.1.1'
androidTestImplementation 'androidx.annotation:annotation:1.0.0'

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
import android.app.Activity;
import android.content.Context;
import android.graphics.Color;
import android.support.test.espresso.ViewAction;
import android.support.test.espresso.action.CoordinatesProvider;
import android.support.test.espresso.action.GeneralClickAction;
import android.support.test.espresso.action.GeneralSwipeAction;
import android.support.test.espresso.action.Press;
import android.support.test.espresso.action.Swipe;
import android.support.test.espresso.action.Tap;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
import android.support.v7.app.ActionBar;
import androidx.test.espresso.ViewAction;
import androidx.test.espresso.action.CoordinatesProvider;
import androidx.test.espresso.action.GeneralClickAction;
import androidx.test.espresso.action.GeneralSwipeAction;
import androidx.test.espresso.action.Press;
import androidx.test.espresso.action.Swipe;
import androidx.test.espresso.action.Tap;
import androidx.test.rule.ActivityTestRule;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.appcompat.app.ActionBar;
import android.util.DisplayMetrics;
import android.util.Log;
import android.util.TypedValue;
Expand Down Expand Up @@ -41,10 +41,10 @@
import java.util.Locale;
import java.util.TimeZone;

import static android.support.test.InstrumentationRegistry.getInstrumentation;
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.action.ViewActions.click;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static com.github.sundeepk.compactcalendarview.CompactCalendarView.CompactCalendarViewListener;
import static com.github.sundeepk.compactcalendarview.CompactCalendarView.FILL_LARGE_INDICATOR;
import static org.junit.Assert.assertEquals;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package sundeepk.github.com.sample;

import android.os.Bundle;
import android.support.test.runner.AndroidJUnitRunner;
import androidx.test.runner.AndroidJUnitRunner;

import com.facebook.testing.screenshot.ScreenshotRunner;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package sundeepk.github.com.sample;

import android.os.Bundle;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import androidx.viewpager.widget.ViewPager;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@

import android.content.Context;
import android.graphics.Typeface;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;

import androidx.fragment.app.Fragment;
import androidx.viewpager.widget.PagerAdapter;
import androidx.viewpager.widget.ViewPager;
import android.util.AttributeSet;
import android.util.SparseArray;
import android.util.TypedValue;
Expand All @@ -35,7 +37,7 @@
* the user's scroll progress.
* <p>
* To use the component, simply add it to your view hierarchy. Then in your
* {@link android.app.Activity} or {@link android.support.v4.app.Fragment} call
* {@link android.app.Activity} or {@link Fragment} call
* {@link #setViewPager(ViewPager)} providing it the ViewPager this layout is being used for.
* <p>
* The colors can be customized in two ways. The first and simplest is to provide an array of colors
Expand Down
4 changes: 2 additions & 2 deletions sample/src/main/java/sundeepk/github/com/sample/Tab2.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package sundeepk.github.com.sample;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package sundeepk.github.com.sample;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentStatePagerAdapter;

public class ViewPagerAdapter extends FragmentStatePagerAdapter {

Expand Down
4 changes: 2 additions & 2 deletions sample/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
android:elevation="2dp"
android:background="#ffe95451"/>

<android.support.v4.view.ViewPager
<androidx.viewpager.widget.ViewPager
android:id="@+id/pager"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:layout_weight="1">
</android.support.v4.view.ViewPager>
</androidx.viewpager.widget.ViewPager>

</LinearLayout>
2 changes: 1 addition & 1 deletion sample/src/main/res/layout/tool_bar.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar
<androidx.appcompat.widget.Toolbar
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:elevation="2dp"
Expand Down

0 comments on commit fc7f456

Please sign in to comment.