From ec78038ab0c6d43f677e495f23db0d65b42666b8 Mon Sep 17 00:00:00 2001 From: TxcA <447358255@qq.com> Date: Thu, 23 Sep 2021 23:18:28 +0800 Subject: [PATCH] publish `mavenCentral` --- README.md | 1 + build.gradle | 1 + library/build.gradle | 12 +++++++++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dc82ced..942e0d7 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +[![MavenCentral](https://img.shields.io/maven-central/v/com.itxca.msa/msa)](https://search.maven.org/artifact/com.itxca.msa/msa) [![API](https://img.shields.io/badge/API-14%2B-blue.svg?style=flat)](https://android-arsenal.com/api?level=14) [![License](http://img.shields.io/badge/License-MIT-brightgreen.svg?style=flat)](https://opensource.org/licenses/MIT) diff --git a/build.gradle b/build.gradle index 9db2bf1..f2a6edd 100644 --- a/build.gradle +++ b/build.gradle @@ -10,6 +10,7 @@ buildscript { // 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.18.0' } } diff --git a/library/build.gradle b/library/build.gradle index 9019638..4e3fb7b 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -33,4 +33,14 @@ android { dependencies { compileOnly("androidx.appcompat:appcompat:1.3.1") -} \ No newline at end of file +} + +allprojects { + plugins.withId("com.vanniktech.maven.publish") { + mavenPublish { + sonatypeHost = "S01" + } + } +} + +apply plugin: "com.vanniktech.maven.publish" \ No newline at end of file