-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Mark Phelps <[email protected]>
- Loading branch information
1 parent
f172ee0
commit b4489e2
Showing
3 changed files
with
172 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
import java.nio.file.Files | ||
|
||
plugins { | ||
id 'java-library' | ||
id 'maven-publish' | ||
id 'signing' | ||
id "com.diffplug.spotless" version "6.25.0" | ||
} | ||
|
||
group = 'io.flipt' | ||
version = '0.0.1' | ||
description = 'Flipt Client SDK' | ||
|
||
|
||
java { | ||
sourceCompatibility = 1.8 | ||
targetCompatibility = 1.8 | ||
withSourcesJar() | ||
withJavadocJar() | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.17.2' | ||
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.17.2' | ||
implementation 'net.java.dev.jna:jna-platform:5.15.0' | ||
testImplementation platform('org.junit:junit-bom:5.11.0') | ||
testImplementation 'org.junit.jupiter:junit-jupiter' | ||
} | ||
|
||
spotless { | ||
java { | ||
importOrder() | ||
|
||
removeUnusedImports() | ||
|
||
cleanthat() | ||
|
||
googleJavaFormat() | ||
|
||
formatAnnotations() | ||
} | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
} | ||
|
||
publishing { | ||
publications { | ||
maven(MavenPublication) { | ||
artifactId = 'flipt-client-java-musl' | ||
from components.java | ||
|
||
pom { | ||
name = 'Flipt Client Java SDK' | ||
description = 'Flipt Client Java SDK' | ||
url = 'https://github.com/flipt-io/flipt-client-sdks/tree/main/flipt-client-java' | ||
|
||
licenses { | ||
license { | ||
name = 'MIT' | ||
url = 'https://opensource.org/license/mit/' | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id = 'flipt-io' | ||
name = 'Flipt' | ||
email = '[email protected]' | ||
} | ||
} | ||
|
||
scm { | ||
connection = 'scm:git:git://github.com/flipt-io/flipt-client-sdks.git' | ||
developerConnection = 'scm:git:ssh://github.com/flipt-io/flipt-client-sdks.git' | ||
url = 'https://github.com/flipt-io/flipt-client-sdks/tree/main/flipt-client-java' | ||
} | ||
} | ||
} | ||
} | ||
repositories { | ||
maven { | ||
def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" | ||
def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/" | ||
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl | ||
credentials { | ||
username "$System.env.MAVEN_USERNAME" | ||
password "$System.env.MAVEN_PASSWORD" | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
def signingKey = System.getenv('PGP_PRIVATE_KEY') | ||
def signingPassphrase = System.getenv('PGP_PASSPHRASE') | ||
useInMemoryPgpKeys(signingKey, signingPassphrase) | ||
sign publishing.publications.maven | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters