Skip to content

Commit

Permalink
feat: stopped using jcenter. Bumped Kotlin to 1.4.32. Stopped using d…
Browse files Browse the repository at this point in the history
…eprecated Kotlin Android Extensions. Used Kotlin parcelize. Updated AndroidX lifecycle to 2.3.1 and AppCompat to 1.3.0. Demo App: Bumped RecyclerAdapter to 2.10.1, dropped unused custom file picker library.
  • Loading branch information
gotev committed Jun 4, 2021
1 parent c8e1fda commit 181b7d6
Show file tree
Hide file tree
Showing 27 changed files with 26 additions and 405 deletions.
2 changes: 0 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ buildscript {
apply from: 'manifest.gradle'

repositories {
jcenter()
google()
mavenCentral()
maven {
Expand All @@ -24,7 +23,6 @@ buildscript {

allprojects {
repositories {
jcenter()
google()
mavenCentral()
}
Expand Down
2 changes: 0 additions & 2 deletions examples/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ buildscript {
apply from: '../../manifest.gradle'

repositories {
jcenter()
mavenCentral()
google()
maven {
Expand All @@ -28,7 +27,6 @@ buildscript {

allprojects {
repositories {
jcenter()
mavenCentral()
google()
}
Expand Down
6 changes: 2 additions & 4 deletions examples/app/demoapp/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion target_sdk
Expand Down Expand Up @@ -63,7 +62,7 @@ dependencies {
// Support
implementation "androidx.appcompat:appcompat:$androidx_appcompat_version"
implementation "com.google.android.material:material:$androidx_appcompat_version"
implementation "androidx.lifecycle:lifecycle-extensions:$androidx_lifecycle_version"
implementation "androidx.lifecycle:lifecycle-runtime:$androidx_lifecycle_version"

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

Expand All @@ -74,8 +73,7 @@ dependencies {
implementation "com.jakewharton:butterknife:${butterKnifeVersion}"
annotationProcessor "com.jakewharton:butterknife-compiler:${butterKnifeVersion}"

implementation 'com.nononsenseapps:filepicker:4.0.0-beta1'
implementation 'net.gotev:recycleradapter:2.8.1'
implementation 'net.gotev:recycleradapter:2.10.1'

/*implementation "net.gotev:uploadservice:${libraryVersion}"
implementation "net.gotev:uploadservice-okhttp:${libraryVersion}"
Expand Down
29 changes: 0 additions & 29 deletions examples/app/demoapp/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,7 @@
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true">
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/nnf_provider_paths" />
</provider>

<activity
android:name="com.nononsenseapps.filepicker.FilePickerActivity"
android:label="@string/app_name"
android:theme="@style/FilePickerTheme">
<intent-filter>
<action android:name="android.intent.action.GET_CONTENT" />

<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="@string/app_name"
Expand All @@ -57,16 +38,6 @@
android:label="@string/ftp_upload"
android:launchMode="singleTask"
android:parentActivityName=".MainActivity" />
<activity
android:name=".utils.BackHandlingFilePickerActivity"
android:label="@string/select_file"
android:theme="@style/FilePickerTheme">
<intent-filter>
<action android:name="android.intent.action.GET_CONTENT" />

<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,10 @@ public class EmptyItem extends AdapterItem<EmptyItem.Holder> {
int text;

public EmptyItem(@StringRes int textResource) {
super(textResource);
text = textResource;
}

@NonNull
@Override
public String diffingId() {
return EmptyItem.class.getName();
}

@Override
public int getLayoutId() {
return R.layout.item_empty;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public interface Delegate {
};

public UploadItem(int type, String title, String subtitle, Delegate delegate) {
super(type + title + subtitle);
mType = type;
mTitle = title;
mSubtitle = subtitle;
Expand Down Expand Up @@ -82,27 +83,6 @@ public void onRemoveItem() {
}
}

@Override
public int compareTo(@NonNull AdapterItem otherItem) {
if (otherItem.getClass() != getClass())
return -1;

UploadItem other = (UploadItem) otherItem;

if (mType > other.mType)
return 1;

if (mType < other.mType)
return -1;

return mTitle.compareTo(other.mTitle);
}

@Override
public String diffingId() {
return UploadItem.class.getName() + mTitle + mSubtitle;
}

public int getType() {
return mType;
}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 181b7d6

Please sign in to comment.