Do not upload source and Javadoc

Only empty jars will be uploaded
This commit is contained in:
Benoit Marty 2022-01-06 10:05:37 +01:00
parent 23380ca331
commit b11f555b01
2 changed files with 16 additions and 7 deletions

View file

@ -9,7 +9,7 @@ buildscript {
// Release notes of Android Gradle Plugin (AGP): // Release notes of Android Gradle Plugin (AGP):
// https://developer.android.com/studio/releases/gradle-plugin // https://developer.android.com/studio/releases/gradle-plugin
classpath 'com.android.tools.build:gradle:7.0.4' classpath 'com.android.tools.build:gradle:7.0.4'
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.17.0' classpath 'com.vanniktech:gradle-maven-publish-plugin:0.18.0'
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
} }
@ -21,11 +21,14 @@ allprojects {
google() google()
} }
plugins.withId("com.vanniktech.maven.publish") { plugins.withId("com.vanniktech.maven.publish.base") {
// Publish on s01.oss.sonatype.org group = project.getProperties().getOrDefault("GROUP", "0.0.0")
//https://github.com/vanniktech/gradle-maven-publish-plugin#where-to-upload-to version = project.getProperties().getOrDefault("VERSION_NAME", "name")
mavenPublish {
sonatypeHost = "S01" mavenPublishing {
publishToMavenCentral("S01")
pomFromGradleProperties()
signAllPublications()
} }
} }
} }

View file

@ -1,7 +1,9 @@
import org.apache.tools.ant.taskdefs.condition.Os import org.apache.tools.ant.taskdefs.condition.Os
import com.vanniktech.maven.publish.AndroidLibrary
import com.vanniktech.maven.publish.JavadocJar
apply plugin: 'com.android.library' apply plugin: 'com.android.library'
apply plugin: "com.vanniktech.maven.publish" apply plugin: "com.vanniktech.maven.publish.base"
android { android {
compileSdk 31 compileSdk 31
@ -159,3 +161,7 @@ dependencies {
androidTestImplementation 'androidx.test:rules:1.4.0' androidTestImplementation 'androidx.test:rules:1.4.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.ext:junit:1.1.3'
} }
mavenPublishing {
configure(new AndroidLibrary(new JavadocJar.Empty(), false))
}