From 88186623cc68ab9581cb0eaac919fcea8af66dc8 Mon Sep 17 00:00:00 2001 From: Rok Kreslin Date: Fri, 3 Jun 2022 08:46:17 +0200 Subject: [PATCH 1/5] Modify ToastUtil context cast --- .../tedimagepicker/util/TedImagePickerContentProvider.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tedimagepicker/src/main/java/gun0912/tedimagepicker/util/TedImagePickerContentProvider.kt b/tedimagepicker/src/main/java/gun0912/tedimagepicker/util/TedImagePickerContentProvider.kt index 444209f..7c4bcad 100644 --- a/tedimagepicker/src/main/java/gun0912/tedimagepicker/util/TedImagePickerContentProvider.kt +++ b/tedimagepicker/src/main/java/gun0912/tedimagepicker/util/TedImagePickerContentProvider.kt @@ -3,12 +3,13 @@ package gun0912.tedimagepicker.util import android.app.Application import android.content.ContentProvider import android.content.ContentValues +import android.content.Context import android.database.Cursor import android.net.Uri class TedImagePickerContentProvider : ContentProvider() { override fun onCreate(): Boolean { - ToastUtil.context = context as Application + ToastUtil.context = context as Context return true } From e4baeb01117949b74007994d8795bd95460b749a Mon Sep 17 00:00:00 2001 From: Rok Kreslin Date: Fri, 3 Jun 2022 08:51:11 +0200 Subject: [PATCH 2/5] Remove unused import --- .../gun0912/tedimagepicker/util/TedImagePickerContentProvider.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/tedimagepicker/src/main/java/gun0912/tedimagepicker/util/TedImagePickerContentProvider.kt b/tedimagepicker/src/main/java/gun0912/tedimagepicker/util/TedImagePickerContentProvider.kt index 7c4bcad..a922a9d 100644 --- a/tedimagepicker/src/main/java/gun0912/tedimagepicker/util/TedImagePickerContentProvider.kt +++ b/tedimagepicker/src/main/java/gun0912/tedimagepicker/util/TedImagePickerContentProvider.kt @@ -1,6 +1,5 @@ package gun0912.tedimagepicker.util -import android.app.Application import android.content.ContentProvider import android.content.ContentValues import android.content.Context From bd03edaed4109346a1b2d474862fa519aede8144 Mon Sep 17 00:00:00 2001 From: Rok Kreslin Date: Wed, 17 Aug 2022 13:31:50 +0200 Subject: [PATCH 3/5] Use google repository for publishing. --- build.gradle | 10 ---------- gradle.properties | 2 +- tedimagepicker/build.gradle | 29 ++++++++++++++++++++++++++++- 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/build.gradle b/build.gradle index 037d174..9aaa847 100644 --- a/build.gradle +++ b/build.gradle @@ -13,10 +13,6 @@ buildscript { dependencies { classpath "com.android.tools.build:gradle:${versions.gradle}" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}" - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - - classpath 'com.vanniktech:gradle-maven-publish-plugin:0.15.1' } } @@ -28,12 +24,6 @@ allprojects { group = GROUP version = VERSION_NAME - - plugins.withId("com.vanniktech.maven.publish") { - mavenPublish { - sonatypeHost = "S01" - } - } } task clean(type: Delete) { diff --git a/gradle.properties b/gradle.properties index 053d5b1..5ba24e5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -21,7 +21,7 @@ kotlin.code.style=official GROUP=io.github.ParkSangGwon POM_ARTIFACT_ID=tedimagepicker -VERSION_NAME=1.2.8 +VERSION_NAME=1.3.0 POM_NAME=TedImagePicker POM_PACKAGING=aar diff --git a/tedimagepicker/build.gradle b/tedimagepicker/build.gradle index ae6346a..110aa99 100644 --- a/tedimagepicker/build.gradle +++ b/tedimagepicker/build.gradle @@ -1,3 +1,8 @@ +plugins { + id "maven-publish" + id "com.google.cloud.artifactregistry.gradle-plugin" version "2.1.4" +} + apply plugin: 'com.android.library' apply plugin: 'kotlin-android' apply plugin: 'kotlin-kapt' @@ -47,4 +52,26 @@ dependencies { implementation 'com.alexvasilkov:gesture-views:2.5.2' } -apply plugin: "com.vanniktech.maven.publish" +publishing { + publications { + maven(MavenPublication) { + groupId = 'io.github.ParkSangGwon' + artifactId = 'TedImagePicker' + version = VERSION_NAME + afterEvaluate { + from components.release + } + } + } + repositories { + maven { + url "artifactregistry://europe-west1-maven.pkg.dev/round-runner-126807/mightyfields-maven" + } + } +} + +repositories { + maven { + url "artifactregistry://europe-west1-maven.pkg.dev/round-runner-126807/mightyfields-maven" + } +} From f2e548b6e0dca55e84c053ef8c1633890e0e96fe Mon Sep 17 00:00:00 2001 From: Rok Kreslin Date: Wed, 17 Aug 2022 13:32:04 +0200 Subject: [PATCH 4/5] Use kotlin 1.6.0 --- dependencies.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dependencies.gradle b/dependencies.gradle index 73f1892..ff1114b 100755 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -4,7 +4,7 @@ ext { 'compileSdkVersion': 30, 'targetSdkVersion' : 30, 'gradle' : '7.0.2', - 'kotlin' : '1.5.30', + 'kotlin' : '1.6.0', 'supportLibrary' : '25.0.0', ] From 9438f1566c885b65b19bd2e3cb39d3e773256a8f Mon Sep 17 00:00:00 2001 From: Rok Kreslin Date: Thu, 18 Aug 2022 12:54:06 +0200 Subject: [PATCH 5/5] Update instructions --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 918377c..404ba61 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,11 @@ # TedImagePicker [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-TedImagePicker-green.svg?style=flat)](https://android-arsenal.com/details/1/7697) +## Instructions +- Set version in settings.gradle +- Run gradle build +- Set GOOGLE_APPLICATION_CREDENTIALS env variable +- Rum gradle publish + TedImagePicker is **simple/beautiful/smart** image picker - Support Image/Video