Skip to content
This repository was archived by the owner on Apr 19, 2023. It is now read-only.

Commit f174162

Browse files
committed
Update to androidX
1 parent 94e5218 commit f174162

File tree

17 files changed

+175
-254
lines changed

17 files changed

+175
-254
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Drag & drop item decorator for RecyclerView with support for highlighting hovere
66
Usage
77
-----
88

9-
1. Add jcenter() to repositories block in your gradle file.
10-
2. Add `implementation 'com.shuhart.hoveringcallback:hoveringcallback:1.2.6'` to your dependencies.
9+
1. Add mavenCentral() to repositories block in your gradle file.
10+
2. Add `implementation 'com.shuhart:hoveringcallback:1.3.0'` to your dependencies.
1111
3. Look into the sample for additional details on how to use and configure the library.
1212

1313
Example:

build.gradle

+4-5
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,8 @@ buildscript {
77
jcenter()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:3.0.1'
11-
12-
13-
// NOTE: Do not place your application dependencies here; they belong
14-
// in the individual module build.gradle files
10+
classpath 'com.android.tools.build:gradle:4.1.2'
11+
classpath 'io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.22.0'
1512
}
1613
}
1714

@@ -25,3 +22,5 @@ allprojects {
2522
task clean(type: Delete) {
2623
delete rootProject.buildDir
2724
}
25+
26+
apply plugin: 'io.codearte.nexus-staging'

gradle.properties

+1
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ org.gradle.jvmargs=-Xmx1536m
1515
# This option should only be used with decoupled projects. More details, visit
1616
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1717
# org.gradle.parallel=true
18+
android.useAndroidX=true
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Wed Jan 31 00:04:09 ALMT 2018
1+
#Sat Feb 20 23:37:00 MSK 2021
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip

hoveringcallback/build.gradle

+4-122
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,16 @@
11
apply plugin: 'com.android.library'
2-
apply plugin: 'com.github.dcendents.android-maven'
3-
apply plugin: 'com.jfrog.bintray'
4-
5-
ext {
6-
bintrayRepo = 'HoveringCallback'
7-
bintrayName = 'hoveringcallback'
8-
9-
publishedGroupId = 'com.shuhart.hoveringcallback'
10-
libraryName = 'hoveringcallback'
11-
artifact = 'hoveringcallback'
12-
13-
libraryDescription = 'Drag & drop item decorator for RecyclerView with support for highlighting hovered items.'
14-
15-
siteUrl = 'https://github.com/shuhart/HoveringCallback'
16-
gitUrl = 'https://github.com/shuhart/HoveringCallback.git'
17-
18-
libraryVersion = '1.2.6'
19-
20-
developerId = 'shuhart'
21-
developerName = 'Redrick Shuhart'
22-
developerEmail = '[email protected]'
23-
24-
licenseName = 'The Apache Software License, Version 2.0'
25-
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
26-
allLicenses = ["Apache-2.0"]
27-
}
282

293
buildscript {
304
repositories {
315
jcenter()
326
}
33-
dependencies {
34-
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'
35-
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
36-
}
377
}
388

399
android {
40-
compileSdkVersion 27
10+
compileSdkVersion 30
4111
defaultConfig {
4212
minSdkVersion 14
43-
targetSdkVersion 27
13+
targetSdkVersion 30
4414
versionCode 1
4515
versionName "1.0"
4616

@@ -52,97 +22,9 @@ android {
5222
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
5323
}
5424
}
55-
buildToolsVersion '27.0.3'
25+
buildToolsVersion '30.0.2'
5626
}
5727

58-
def supportVersion = "27.0.2"
59-
6028
dependencies {
61-
implementation "com.android.support:recyclerview-v7:$supportVersion"
62-
testImplementation 'junit:junit:4.12'
63-
androidTestImplementation 'com.android.support.test:runner:1.0.1'
64-
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
65-
}
66-
67-
68-
group = publishedGroupId
69-
version = libraryVersion
70-
71-
install {
72-
repositories.mavenInstaller {
73-
// This generates POM.xml with proper parameters
74-
pom {
75-
project {
76-
packaging 'aar'
77-
groupId publishedGroupId
78-
artifactId artifact
79-
80-
// Add your description here
81-
name libraryName
82-
description libraryDescription
83-
url siteUrl
84-
85-
// Set your license
86-
licenses {
87-
license {
88-
name licenseName
89-
url licenseUrl
90-
}
91-
}
92-
developers {
93-
developer {
94-
id developerId
95-
name developerName
96-
email developerEmail
97-
}
98-
}
99-
scm {
100-
connection gitUrl
101-
developerConnection gitUrl
102-
url siteUrl
103-
104-
}
105-
}
106-
}
107-
}
108-
}
109-
110-
if (project.hasProperty("android")) { // Android libraries
111-
task sourcesJar(type: Jar) {
112-
classifier = 'sources'
113-
from android.sourceSets.main.java.srcDirs
114-
}
115-
}
116-
117-
artifacts {
118-
archives sourcesJar
119-
}
120-
121-
// Bintray
122-
File localProps = project.rootProject.file('local.properties')
123-
124-
if (localProps.exists()) {
125-
Properties properties = new Properties()
126-
properties.load(localProps.newDataInputStream())
127-
128-
bintray {
129-
user = properties.getProperty("bintray.user")
130-
key = properties.getProperty("bintray.apikey")
131-
132-
configurations = ['archives']
133-
pkg {
134-
repo = bintrayRepo
135-
name = bintrayName
136-
desc = libraryDescription
137-
websiteUrl = siteUrl
138-
vcsUrl = gitUrl
139-
licenses = allLicenses
140-
publish = true
141-
publicDownloadNumbers = true
142-
version {
143-
name = libraryVersion
144-
desc = libraryDescription
145-
}
146-
}
147-
}
29+
implementation "androidx.recyclerview:recyclerview:1.1.0"
14830
}

hoveringcallback/src/androidTest/java/com/shuhart/hoveringcallback/ExampleInstrumentedTest.java

-26
This file was deleted.

hoveringcallback/src/main/java/com/shuhart/hoveringcallback/HoverItemDecoration.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
package com.shuhart.hoveringcallback;
22

33
import android.graphics.Canvas;
4-
import android.support.annotation.Nullable;
5-
import android.support.v7.widget.RecyclerView;
6-
import android.support.v7.widget.helper.ItemTouchHelper;
74
import android.view.View;
85

6+
import androidx.annotation.Nullable;
7+
import androidx.recyclerview.widget.ItemTouchHelper;
8+
import androidx.recyclerview.widget.RecyclerView;
9+
910
public class HoverItemDecoration extends ItemTouchHelper {
1011
private ItemBackgroundCallback backgroundCallback;
1112
private HoveringCallback callback;

hoveringcallback/src/main/java/com/shuhart/hoveringcallback/HoveringCallback.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
package com.shuhart.hoveringcallback;
22

33
import android.graphics.Canvas;
4-
import android.support.annotation.Nullable;
5-
import android.support.v7.widget.RecyclerView;
6-
import android.support.v7.widget.helper.ItemTouchHelper;
74
import android.view.View;
85

6+
import androidx.annotation.Nullable;
7+
import androidx.recyclerview.widget.ItemTouchHelper;
8+
import androidx.recyclerview.widget.RecyclerView;
9+
910
import java.util.ArrayList;
1011
import java.util.List;
1112

hoveringcallback/src/main/java/com/shuhart/hoveringcallback/ItemBackgroundCallback.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.shuhart.hoveringcallback;
22

3-
import android.support.annotation.ColorInt;
4-
import android.support.annotation.NonNull;
5-
import android.support.v7.widget.RecyclerView;
3+
import androidx.annotation.ColorInt;
4+
import androidx.annotation.NonNull;
5+
import androidx.recyclerview.widget.RecyclerView;
66

77
public interface ItemBackgroundCallback {
88

hoveringcallback/src/test/java/com/shuhart/hoveringcallback/ExampleUnitTest.java

-17
This file was deleted.

0 commit comments

Comments
 (0)