From 44f7dd2d8b3b49c06e32de3e65b0faea7ed82932 Mon Sep 17 00:00:00 2001 From: Nickolay Shmyrev Date: Sun, 7 Nov 2021 20:41:49 +0100 Subject: [PATCH] Publish to sonatype --- .gitignore | 1 + android/build.gradle | 28 ++++++++++++++++++---------- android/lib/build.gradle | 1 + 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 4de112a6..b0896770 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ gradlew gradlew.bat gradle local.properties +gradle.properties # Android android/build diff --git a/android/build.gradle b/android/build.gradle index 40fbb540..a0207881 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,25 +1,37 @@ buildscript { repositories { google() - jcenter() + mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:4.1.3' + classpath 'com.android.tools.build:gradle:4.2.0' + classpath 'com.vanniktech:gradle-maven-publish-plugin:0.18.0' } } allprojects { version = '0.3.32' + } subprojects { apply plugin: 'com.android.library' apply plugin: 'maven-publish' + apply plugin: 'com.vanniktech.maven.publish' + + plugins.withId('com.vanniktech.maven.publish') { + mavenPublish { + group = 'com.alphacephei' + version = version + sonatypeHost = 's01' + androidVariantToPublish = 'release' + } + } repositories { google() - jcenter() + mavenCentral() } publishing { @@ -29,8 +41,8 @@ subprojects { version version pom { url = 'http://www.alphacephei.com.com/vosk/' - licenses { - license { + licenses { + license { name = 'The Apache License, Version 2.0' url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' } @@ -49,10 +61,6 @@ subprojects { } } } - repositories { - maven { - url = "$rootDir/repo" - } - } } + } diff --git a/android/lib/build.gradle b/android/lib/build.gradle index 5010ee1a..e8b5c02d 100644 --- a/android/lib/build.gradle +++ b/android/lib/build.gradle @@ -10,6 +10,7 @@ android { versionCode 6 versionName = version archivesBaseName = archiveName + ndkVersion = "22.1.7171670" } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8