Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ jobs:
SONATYPE_PASSWORD_ESCAPED=$(printf '%s\n' "$SONATYPE_PASSWORD" | sed -e 's/[\/&]/\\&/g')
sed -i -e "s,sonatypeUsername=,sonatypeUsername=$SONATYPE_USERNAME,g" gradle.properties
sed -i -e "s,sonatypePassword=,sonatypePassword=$SONATYPE_PASSWORD_ESCAPED,g" gradle.properties
sed -i -e "s,mavenCentralUsername=,mavenCentralUsername=$SONATYPE_USERNAME,g" gradle.properties
sed -i -e "s,mavenCentralPassword=,mavenCentralPassword=$SONATYPE_PASSWORD_ESCAPED,g" gradle.properties
sed -i -e "s,githubPassword=,githubPassword=$GITHUB_PASSWORD,g" gradle.properties
sed -i -e "s,signing.keyId=,signing.keyId=$GPG_KEY_ID,g" gradle.properties
sed -i -e "s,signing.password=,signing.password=$GPG_PASSWORD,g" gradle.properties
Expand Down
144 changes: 52 additions & 92 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ buildscript { // Configuration for building
}

plugins {
id "com.vanniktech.maven.publish" version "0.34.0"
id 'java-library'
id 'maven-publish'
id 'signing'
Expand All @@ -29,100 +28,61 @@ 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'
// }
// }
// }
// 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
// }
// }
// }
//}

//import com.vanniktech.maven.publish.SonatypeHost

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"

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'
}
}
}
groupId group
artifactId project.ext.artifactId
version version
from components.java
}
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.")
}
repositories {
maven {
name = "mavencentral"
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username sonatypeUsername
password sonatypePassword
}
}
}
}

dependencies {
implementation 'jstl:jstl:1.2'
compile 'jstl:jstl:1.2'

annotationProcessor 'com.google.auto.value:auto-value:1.6.2'

Expand All @@ -141,18 +101,18 @@ dependencies {
testImplementation 'org.mockito:mockito-core:3.12.4'
}

//signing {
// sign publishing.publications.authLib
//}
signing {
sign publishing.publications.authLib
}

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

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

artifacts {
Expand Down
7 changes: 0 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,3 @@ signing.secretKeyRingFile=
sonatypeUsername=
sonatypePassword=

mavenCentralUsername=
mavenCentralPassword=

# Add a property to enable automatic release to Maven Central (optional, but good for CI)
# If true, publishToMavenCentral will also close and release the staging repository
mavenCentralAutomaticRelease=false

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
12 changes: 5 additions & 7 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -57,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -86,7 +84,7 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -114,7 +112,7 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac

CLASSPATH="\\\"\\\""
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar


# Determine the Java command to use to start the JVM.
Expand Down Expand Up @@ -205,15 +203,15 @@ fi
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
org.gradle.wrapper.GradleWrapperMain \
"$@"

# Stop when "xargs" is not available.
Expand Down
Loading