1- /*
2- * This build file was generated by the Gradle 'init' task.
3- *
4- * This generated file contains a sample Java Library project to get you started.
5- * For more details take a look at the Java Libraries chapter in the Gradle
6- * user guide available at https://docs.gradle.org/4.4.1/userguide/java_library_plugin.html
7- */
8-
9- // Apply the java-library plugin to add support for Java Library
10- apply plugin : ' java-library'
11-
12- // In this section you declare where to find the dependencies of your project
1+
2+ plugins {
3+ id " java"
4+ id " java-library"
5+ id " checkstyle"
6+ id " jacoco"
7+ id " signing"
8+ id " com.github.johnrengelman.shadow" version " 7.1.2"
9+ id " maven-publish"
10+ id " io.github.gradle-nexus.publish-plugin" version ' 1.2.0'
11+ id " idea"
12+ }
13+
14+ java {
15+ withJavadocJar()
16+ withSourcesJar()
17+ }
18+
1319repositories {
14- // Use jcenter for resolving your dependencies.
15- // You can declare any Maven/Ivy/file repository here.
16- jcenter()
20+ mavenLocal()
21+ mavenCentral()
22+ }
23+
24+ test {
25+ testLogging {
26+ events " passed" , " skipped" , " failed" , " standardOut" , " standardError"
27+ showStandardStreams = true
28+ exceptionFormat = ' full'
29+ }
30+ dependsOn ' cleanTest'
31+ finalizedBy jacocoTestReport // report is always generated after tests run
32+ }
33+
34+ jacocoTestReport {
35+ dependsOn test // tests are required to run before generating the report
36+ }
37+
38+ checkstyle {
39+ toolVersion = " 9.3"
40+ configFile file(" ${ project.rootDir} /config/checkstyle/checkstyle.xml" )
41+ checkstyleTest. enabled = false
42+ }
43+
44+ publishing {
45+ publications {
46+ mavenJava(MavenPublication ) { publication ->
47+ from components. java
48+
49+ artifactId = ' launchdarkly-openfeature-serverprovider'
50+
51+ pom {
52+ name = ' LaunchDarkly OpenFeature provider for the Server-Side SDK for Java'
53+ packaging = ' jar'
54+ url = ' https://github.com/launchdarkly/openfeature-java-server'
55+
56+ licenses {
57+ license {
58+ name = ' The Apache License, Version 2.0'
59+ url = ' http://www.apache.org/licenses/LICENSE-2.0.txt'
60+ }
61+ }
62+
63+ developers {
64+ developer {
65+ name = ' LaunchDarkly SDK Team'
66+ 67+ }
68+ }
69+
70+ scm {
71+ connection = ' scm:git:git://github.com/launchdarkly/openfeature-java-server'
72+ developerConnection
= ' scm:git:ssh:[email protected] :launchdarkly/openfeature-java-server.git' 73+ url = ' https://github.com/launchdarkly/openfeature-java-server'
74+ }
75+ }
76+ }
77+ }
78+ repositories {
79+ mavenLocal()
80+ }
81+ }
82+
83+ nexusPublishing {
84+ clientTimeout = java.time.Duration . ofMinutes(2 ) // we've seen extremely long delays in creating repositories
85+ repositories {
86+ sonatype {
87+ username = ossrhUsername
88+ password = ossrhPassword
89+ }
90+ }
1791}
1892
1993dependencies {
@@ -23,8 +97,8 @@ dependencies {
2397 // This dependency is used internally, and not exposed to consumers on their own compile classpath.
2498 implementation ' com.google.guava:guava:23.0'
2599
26- implementation group : ' com.launchdarkly' , name : ' launchdarkly-java-server-sdk' , version : ' 6.0.0 '
27- implementation ' dev.openfeature:sdk:1.2.0'
100+ implementation group : ' com.launchdarkly' , name : ' launchdarkly-java-server-sdk' , version : ' 6.+ '
101+ implementation ' dev.openfeature:sdk:[ 1.2.0,2.0.0) '
28102
29103 // Use JUnit test framework
30104 testImplementation ' junit:junit:4.12'
0 commit comments