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

Fix build on Android Studio 4.0 #39

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
*.iml
.gradle
/local.properties
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
.DS_Store
/build
/captures
.externalNativeBuild
/.idea/caches/build_file_checksums.ser
/app/release/
/.idea/misc.xml
/gradle2/
/patternlockview/build
/patternlockview-reactive/build
/app/build
116 changes: 116 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ This library is available in **jCenter** which is the default Maven repository u
dependencies {
// other dependencies here

compile 'com.andrognito.patternlockview:patternlockview:1.0.0'
implementation 'com.andrognito.patternlockview:patternlockview:1.0.0'
// Optional, for RxJava2 adapter
compile 'com.andrognito.patternlockview:patternlockview-reactive:1.0.0'
implementation 'com.andrognito.patternlockview:patternlockview-reactive:1.0.0'
}
```

Expand Down Expand Up @@ -71,13 +71,13 @@ private PatternLockViewListener mPatternLockViewListener = new PatternLockViewLi
@Override
public void onProgress(List<PatternLockView.Dot> progressPattern) {
Log.d(getClass().getName(), "Pattern progress: " +
PatternLockUtils.patternToString(mPatternLockView, progressPattern));
PatternLockUtils.patternToIntArray(mPatternLockView, progressPattern));
}

@Override
public void onComplete(List<PatternLockView.Dot> pattern) {
Log.d(getClass().getName(), "Pattern complete: " +
PatternLockUtils.patternToString(mPatternLockView, pattern));
PatternLockUtils.patternToIntArray(mPatternLockView, pattern));
}

@Override
Expand All @@ -103,10 +103,10 @@ RxPatternLockView.patternChanges(mPatternLockView)
Log.d(getClass().getName(), "Pattern drawing started");
} else if (event.getEventType() == PatternLockCompoundEvent.EventType.PATTERN_PROGRESS) {
Log.d(getClass().getName(), "Pattern progress: " +
PatternLockUtils.patternToString(mPatternLockView, event.getPattern()));
PatternLockUtils.patternToIntArray(mPatternLockView, event.getPattern()));
} else if (event.getEventType() == PatternLockCompoundEvent.EventType.PATTERN_COMPLETE) {
Log.d(getClass().getName(), "Pattern complete: " +
PatternLockUtils.patternToString(mPatternLockView, event.getPattern()));
PatternLockUtils.patternToIntArray(mPatternLockView, event.getPattern()));
} else if (event.getEventType() == PatternLockCompoundEvent.EventType.PATTERN_CLEARED) {
Log.d(getClass().getName(), "Pattern has been cleared");
}
Expand Down
9 changes: 4 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
Expand All @@ -13,8 +12,8 @@ android {
}

dependencies {
compile project(':patternlockview')
compile project(':patternlockview-reactive')
compile rootProject.ext.supportV7
compile rootProject.ext.rxJava
implementation project(':patternlockview')
implementation project(':patternlockview-reactive')
implementation rootProject.ext.appcompat
implementation rootProject.ext.rxJava
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.andrognito.patternlockdemo;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatActivity;
import android.util.Log;
import android.view.Window;
import android.view.WindowManager;
Expand All @@ -14,6 +14,7 @@
import com.andrognito.rxpatternlockview.events.PatternLockCompleteEvent;
import com.andrognito.rxpatternlockview.events.PatternLockCompoundEvent;

import java.util.Arrays;
import java.util.List;

import io.reactivex.functions.Consumer;
Expand All @@ -31,13 +32,13 @@ public void onStarted() {
@Override
public void onProgress(List<PatternLockView.Dot> progressPattern) {
Log.d(getClass().getName(), "Pattern progress: " +
PatternLockUtils.patternToString(mPatternLockView, progressPattern));
Arrays.toString(PatternLockUtils.patternToIntArray(mPatternLockView, progressPattern)));
}

@Override
public void onComplete(List<PatternLockView.Dot> pattern) {
Log.d(getClass().getName(), "Pattern complete: " +
PatternLockUtils.patternToString(mPatternLockView, pattern));
Arrays.toString(PatternLockUtils.patternToIntArray(mPatternLockView, pattern)));
}

@Override
Expand Down Expand Up @@ -86,10 +87,10 @@ public void accept(PatternLockCompoundEvent event) throws Exception {
Log.d(getClass().getName(), "Pattern drawing started");
} else if (event.getEventType() == PatternLockCompoundEvent.EventType.PATTERN_PROGRESS) {
Log.d(getClass().getName(), "Pattern progress: " +
PatternLockUtils.patternToString(mPatternLockView, event.getPattern()));
Arrays.toString(PatternLockUtils.patternToIntArray(mPatternLockView, event.getPattern())));
} else if (event.getEventType() == PatternLockCompoundEvent.EventType.PATTERN_COMPLETE) {
Log.d(getClass().getName(), "Pattern complete: " +
PatternLockUtils.patternToString(mPatternLockView, event.getPattern()));
Arrays.toString(PatternLockUtils.patternToIntArray(mPatternLockView, event.getPattern())));
} else if (event.getEventType() == PatternLockCompoundEvent.EventType.PATTERN_CLEARED) {
Log.d(getClass().getName(), "Pattern has been cleared");
}
Expand Down
12 changes: 7 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
classpath 'com.android.tools.build:gradle:4.0.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
}
Expand All @@ -14,17 +15,18 @@ buildscript {
allprojects {
repositories {
jcenter()
google()
}
}

ext {
minSdkVersion = 14
targetSdkVersion = 25
compileSdkVersion = 25
buildToolsVersion = '25.0.2'
targetSdkVersion = 29
compileSdkVersion = 29

// dependencies
supportV7 = 'com.android.support:appcompat-v7:25.3.0'
appcompat = 'androidx.appcompat:appcompat:1.0.0'
annotation = 'androidx.annotation:annotation:1.1.0'
rxJava = 'io.reactivex.rxjava2:rxjava:2.0.2'
rxAndroid = 'io.reactivex.rxjava2:rxandroid:2.0.0'
}
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
VERSION_NAME=1.0.0
VERSION_CODE=1
GROUP=com.andrognito.patternlockview
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 @@
#Sun Mar 19 20:13:42 IST 2017
#Tue Jun 02 11:53:03 JST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
8 changes: 4 additions & 4 deletions patternlockview-reactive/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ ext {

android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
Expand All @@ -38,9 +37,10 @@ android {
}

dependencies {
compile project(':patternlockview')
compile rootProject.ext.rxJava
compile rootProject.ext.rxAndroid
implementation project(':patternlockview')
implementation rootProject.ext.annotation
implementation rootProject.ext.rxJava
implementation rootProject.ext.rxAndroid
}

apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.andrognito.rxpatternlockview.events;

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

import com.andrognito.patternlockview.PatternLockView;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.andrognito.rxpatternlockview.events;

import android.support.annotation.IntDef;
import androidx.annotation.IntDef;

import com.andrognito.patternlockview.PatternLockView;

Expand Down
4 changes: 2 additions & 2 deletions patternlockview/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ ext {

android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
Expand All @@ -38,7 +37,8 @@ android {
}

dependencies {
compile rootProject.ext.supportV7
implementation rootProject.ext.appcompat
implementation rootProject.ext.annotation
}

apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
Expand Down
Loading