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

Migrate sample to kotlin #295

Merged
merged 2 commits into from
Oct 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
buildscript {
ext.kotlin_version = '1.4.10'
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

Expand All @@ -19,8 +21,10 @@ ext {

allprojects {
repositories {
jcenter()
mavenCentral()
google()
maven { url "https://jitpack.io" }
jcenter()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import android.os.Build;
import android.provider.MediaStore;

import androidx.core.content.FileProvider;

import com.esafirm.imagepicker.features.ImagePickerConfigFactory;
import com.esafirm.imagepicker.features.common.BaseConfig;
import com.esafirm.imagepicker.helper.ImagePickerUtils;
Expand All @@ -19,8 +21,6 @@
import java.io.Serializable;
import java.util.Locale;

import androidx.core.content.FileProvider;

public class DefaultCameraModule implements CameraModule, Serializable {

private String currentImagePath;
Expand Down
10 changes: 5 additions & 5 deletions sample/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
final sdk = rootProject.ext.sdk
Expand Down Expand Up @@ -27,22 +29,20 @@ android {

}

repositories {
maven { url "https://jitpack.io" }
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')

implementation "com.github.bumptech.glide:glide:4.10.0"
implementation "androidx.appcompat:appcompat:1.1.0"
implementation "androidx.appcompat:appcompat:1.2.0"

/* Development */
implementation project(':rximagepicker')
implementation project(':imagepicker')

debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.6.2'
debugImplementation 'com.squareup.leakcanary:leakcanary-support-fragment:1.6.2'
implementation "androidx.core:core-ktx:1.3.2"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

/* Release Check */
// final imagePickerVersion = '2.3.0'
Expand Down
21 changes: 0 additions & 21 deletions sample/src/debug/java/sample/SampleApplication.java

This file was deleted.

19 changes: 19 additions & 0 deletions sample/src/debug/java/sample/SampleApplication.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package sample

import android.app.Application
import com.esafirm.sample.BuildConfig
import com.squareup.leakcanary.LeakCanary

class SampleApplication : Application() {
override fun onCreate() {
super.onCreate()
if (BuildConfig.DEBUG) {
if (LeakCanary.isInAnalyzerProcess(this)) {
// This process is dedicated to LeakCanary for heap analysis.
// You should not init your app in this process.
return
}
LeakCanary.install(this)
}
}
}
183 changes: 0 additions & 183 deletions sample/src/main/java/com/esafirm/sample/CustomUIActivity.java

This file was deleted.

Loading