diff --git a/README.md b/README.md index 2819ae3..b5824d5 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,6 @@ | [JS](https://github.com/wulkanowy/uonet-request-signer/tree/master/js) | [![npm](https://img.shields.io/npm/v/@wulkanowy/uonet-request-signer.svg?style=flat-square)](https://www.npmjs.com/package/@wulkanowy/uonet-request-signer) | | [Node.js](https://github.com/wulkanowy/uonet-request-signer/tree/master/node) | [![npm](https://img.shields.io/npm/v/@wulkanowy/uonet-request-signer-node.svg?style=flat-square)](https://www.npmjs.com/package/@wulkanowy/uonet-request-signer-node) | | [JVM](https://github.com/wulkanowy/uonet-request-signer/tree/master/jvm) | [![JitPack](https://img.shields.io/jitpack/v/wulkanowy/uonet-request-signer.svg?style=flat-square)](https://jitpack.io/#wulkanowy/uonet-request-signer) | -| [Android](https://github.com/wulkanowy/uonet-request-signer/tree/master/android) | [![JitPack](https://img.shields.io/jitpack/v/wulkanowy/uonet-request-signer.svg?style=flat-square)](https://jitpack.io/#wulkanowy/uonet-request-signer) | +| [Android](https://github.com/wulkanowy/uonet-request-signer/tree/master/android) | [![JitPack](https://img.shields.io/bintray/v/wulkanowy/wulkanowy/signer-android.svg?style=flat-square)](https://bintray.com/wulkanowy/wulkanowy/signer-android) | | [PHP](https://github.com/wulkanowy/uonet-request-signer/tree/master/php) | [![Packagist Pre Release](https://img.shields.io/packagist/vpre/wulkanowy/uonet-request-signer.svg?style=flat-square)](https://packagist.org/packages/wulkanowy/uonet-request-signer) | | [Python](https://github.com/wulkanowy/uonet-request-signer/tree/master/python) | [![pypi](https://img.shields.io/pypi/v/uonet-request-signer.svg?style=flat-square)](https://pypi.org/project/uonet-request-signer/) | diff --git a/android/README.md b/android/README.md index 2a2ae9e..970b65f 100644 --- a/android/README.md +++ b/android/README.md @@ -1,18 +1,18 @@ # Uonet+ request signer for android -[![](https://jitpack.io/v/wulkanowy/uonet-request-signer.svg)](https://jitpack.io/#wulkanowy/uonet-request-signer) +[![Bintray](https://img.shields.io/bintray/v/wulkanowy/wulkanowy/signer-android.svg?style=flat-square)](https://bintray.com/wulkanowy/wulkanowy/signer-android) ## Instalation ```grovy allprojects { repositories { - maven { url 'https://jitpack.io' } + maven { url "https://dl.bintray.com/wulkanowy/wulkanowy" } } } dependencies { - implementation 'com.github.wulkanowy:uonet-request-signer:android:master-SNAPSHOT' + implementation "io.github.wulkanowy:signer-android:0.1.0" } ``` diff --git a/android/app/build.gradle b/android/app/build.gradle index c1a1221..1255a13 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -22,7 +22,7 @@ android { } dependencies { - implementation project(":lib") + implementation "io.github.wulkanowy:signer-android:0.1.0" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.core:core-ktx:1.1.0' diff --git a/android/build.gradle b/android/build.gradle index 953c498..4cc8019 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -5,12 +5,14 @@ buildscript { repositories { google() jcenter() + maven { url "https://plugins.gradle.org/m2/" } } dependencies { classpath 'com.android.tools.build:gradle:3.5.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' + classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4' } } @@ -18,7 +20,7 @@ allprojects { repositories { google() jcenter() - + maven { url "https://dl.bintray.com/wulkanowy/wulkanowy" } } } diff --git a/android/lib/build.gradle b/android/lib/build.gradle index 3ec00ad..ca9115e 100644 --- a/android/lib/build.gradle +++ b/android/lib/build.gradle @@ -1,8 +1,16 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' apply plugin: 'com.github.dcendents.android-maven' +apply plugin: 'com.jfrog.bintray' -group 'com.github.wulkanowy' +ext { + PUBLISH_VERSION = '0.1.0' + SITE_URL = 'https://github.com/wulkanowy/uonet-request-signer' + GIT_URL = 'https://github.com/wulkanowy/uonet-request-signer.git' +} + +group 'io.github.wulkanowy' +version PUBLISH_VERSION android { compileSdkVersion 29 @@ -12,7 +20,7 @@ android { minSdkVersion 15 targetSdkVersion 29 versionCode 1 - versionName "0.1.0" + versionName PUBLISH_VERSION testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles 'consumer-rules.pro' @@ -32,3 +40,65 @@ dependencies { androidTestImplementation 'androidx.test.ext:junit:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' } + +bintray { + user = System.getenv('BINTRAY_USER') + key = System.getenv('BINTRAY_KEY') + configurations = ['archives'] + pkg { + repo = 'wulkanowy' + name = 'signer-android' + userOrg = 'wulkanowy' + licenses = ['Apache-2.0'] + vcsUrl = GIT_URL + labels = ['aar', 'wulkanowy', 'api'] + publicDownloadNumbers = true + publish = true + + version { + name = PUBLISH_VERSION + vcsTag = PUBLISH_VERSION + released = new Date() + } + } +} + +install { + repositories.mavenInstaller { + pom { + project { + packaging 'aar' + artifactId "signer-android" + name 'UONET UONET+ request signer for android' + url SITE_URL + licenses { + license { + name 'The Apache Software License, Version 2.0' + url 'http://www.apache.org/licenses/LICENSE-2.0.txt' + } + } + developers { + developer { + id 'mklkj' + name 'MikoĊ‚aj Pich' + email 'm.pich@outlook.com' + } + } + scm { + connection GIT_URL + developerConnection GIT_URL + url SITE_URL + } + } + } + } +} + +task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' +} + +artifacts { + archives sourcesJar +}