Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 31 additions & 75 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript { // Configuration for building
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
id "com.vanniktech.maven.publish" version "0.34.0"
}

apply plugin: 'java' // standard Java tasks
Expand All @@ -29,53 +29,38 @@ repositories { // repositories for Jar's you access in your code
mavenCentral()
}

publishing {
publications {
authLib(MavenPublication) {
pom {
name = 'Fleet Engine Auth Library'
description = 'Provides a set of tools to simplify the Fleet Engine setup process.'
url = 'https://github.com/googlemaps/java-fleetengine-auth'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
organization {
name = 'Google, Inc.'
url = 'http://www.google.com'
}
issueManagement {
system = 'GitHub Issues'
url = 'http://github.com/googlemaps/java-fleetengine-auth/issues'
}
scm {
connection = 'scm:git:git://github.com/googlemaps/java-fleetengine-auth.git'
developerConnection = 'scm:git:ssh://github.com/googlemaps/java-fleetengine-auth.git'
url = 'http://github.com/googlemaps/java-fleetengine-auth/'
tag = 'HEAD'
}
developers {
developer {
id = 'danielfbright'
name = 'Daniel Bright'
}
}
mavenPublishing {
publishToMavenCentral()
signAllPublications()
pom {
name = "Fleet Engine Auth Library"
description = "Provides a set of tools to simplify the Fleet Engine setup process."
url = "https://github.com/googlemaps/java-fleetengine-auth"
licenses {
license {
name = "The Apache License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
distribution = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
groupId group
artifactId project.ext.artifactId
version version
from components.java
}
}
repositories {
maven {
name = "mavencentral"
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username sonatypeUsername
password sonatypePassword
organization {
name = 'Google, Inc.'
url = 'http://www.google.com'
}
issueManagement {
system = 'GitHub Issues'
url = 'http://github.com/googlemaps/java-fleetengine-auth/issues'
}
scm {
connection = 'scm:git:git://github.com/googlemaps/java-fleetengine-auth.git'
developerConnection = 'scm:git:ssh://github.com/googlemaps/java-fleetengine-auth.git'
url = 'http://github.com/googlemaps/java-fleetengine-auth/'
tag = 'HEAD'
}
developers {
developer {
id.set("google")
name.set("Google Inc.")
}
}
}
Expand All @@ -100,32 +85,3 @@ dependencies {
testImplementation 'com.google.truth:truth:1.1'
testImplementation 'org.mockito:mockito-core:3.12.4'
}

signing {
sign publishing.publications.authLib
}

task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier = 'javadoc'
from 'build/docs/javadoc'
}

task sourcesJar(type: Jar) {
from sourceSets.main.allSource
archiveClassifier = 'sources'
}

artifacts {
archives jar
archives javadocJar
archives sourcesJar
}

java {
withJavadocJar()
withSourcesJar()
}


compileJava.options.encoding = 'UTF-8'
javadoc.options.encoding = 'UTF-8'