Skip to content

Commit

Permalink
docs: Build javadocs jar (#53)
Browse files Browse the repository at this point in the history
* docs: Build javadocs jar

* docs: Exclude protobuf from javadocs

* docs: Fix warnings
  • Loading branch information
fabriziodemaria authored Sep 29, 2023
1 parent 037ba8d commit ff92968
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 29 deletions.
47 changes: 18 additions & 29 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,24 @@
<resource><directory>src/main/proto</directory></resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<excludePackageNames>
com.spotify.confidence.flags.*
</excludePackageNames>
</configuration>
</plugin>
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
Expand Down Expand Up @@ -333,33 +351,4 @@
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.1</version>
<configuration>
<show>protected</show>
</configuration>
<reportSets>
<reportSet>
<id>default</id>
<reports>
<report>javadoc</report>
</reports>
</reportSet>
<reportSet>
<id>aggregate</id>
<reports>
<report>aggregate</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.4.1</version>
</plugin>
</plugins>
</reporting>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,32 @@
import java.util.function.Function;
import java.util.regex.Pattern;

/** OpenFeature Provider for feature flagging with the Confidence platform */
public class ConfidenceFeatureProvider implements FeatureProvider {

// Deadline in seconds
public static final int DEADLINE_AFTER_SECONDS = 10;
private final FlagResolverServiceBlockingStub stub;
private final String clientSecret;

static final String TARGETING_KEY = "targeting_key";

/**
* ConfidenceFeatureProvider constructor
*
* @param clientSecret generated from Confidence
* @param stub for testing
*/
public ConfidenceFeatureProvider(String clientSecret, FlagResolverServiceBlockingStub stub) {
this.clientSecret = clientSecret;
this.stub = stub;
}

/**
* ConfidenceFeatureProvider constructor
*
* @param clientSecret generated from Confidence
*/
public ConfidenceFeatureProvider(String clientSecret) {
final ManagedChannel channel =
ManagedChannelBuilder.forAddress("edge-grpc.spotify.com", 443).build();
Expand Down

0 comments on commit ff92968

Please sign in to comment.