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 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/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', ] 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" + } +} diff --git a/tedimagepicker/src/main/java/gun0912/tedimagepicker/util/TedImagePickerContentProvider.kt b/tedimagepicker/src/main/java/gun0912/tedimagepicker/util/TedImagePickerContentProvider.kt index 444209f..a922a9d 100644 --- a/tedimagepicker/src/main/java/gun0912/tedimagepicker/util/TedImagePickerContentProvider.kt +++ b/tedimagepicker/src/main/java/gun0912/tedimagepicker/util/TedImagePickerContentProvider.kt @@ -1,14 +1,14 @@ 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 }