Skip to content

Commit c113f93

Browse files
committed
Ignore if already published in modules
1 parent 5a6ee5e commit c113f93

File tree

6 files changed

+46
-0
lines changed

6 files changed

+46
-0
lines changed

client/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<version>0.8.0</version>
2525
<extensions>true</extensions>
2626
<configuration>
27+
<ignorePublishedComponents>true</ignorePublishedComponents>
2728
<publishingServerId>central</publishingServerId>
2829
<autoPublish>false</autoPublish>
2930
<waitUntil>published</waitUntil>

okhttp-modules/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<version>0.8.0</version>
2626
<extensions>true</extensions>
2727
<configuration>
28+
<ignorePublishedComponents>true</ignorePublishedComponents>
2829
<publishingServerId>central</publishingServerId>
2930
<autoPublish>false</autoPublish>
3031
<waitUntil>published</waitUntil>

pluggable-storage/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
<version>0.8.0</version>
2727
<extensions>true</extensions>
2828
<configuration>
29+
<ignorePublishedComponents>true</ignorePublishedComponents>
2930
<publishingServerId>central</publishingServerId>
3031
<autoPublish>false</autoPublish>
3132
<waitUntil>published</waitUntil>

redis-wrapper/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
<version>0.8.0</version>
4949
<extensions>true</extensions>
5050
<configuration>
51+
<ignorePublishedComponents>true</ignorePublishedComponents>
5152
<publishingServerId>central</publishingServerId>
5253
<autoPublish>false</autoPublish>
5354
<waitUntil>published</waitUntil>

testing/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
<publishingServerId>central</publishingServerId>
4040
<autoPublish>false</autoPublish>
4141
<waitUntil>published</waitUntil>
42+
<ignorePublishedComponents>true</ignorePublishedComponents>
4243
</configuration>
4344
</plugin>
4445
</plugins>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
package io.split.client;
2+
3+
import java.io.IOException;
4+
import java.net.URISyntaxException;
5+
6+
public class App {
7+
public static void main(String[] args) throws IOException, URISyntaxException {
8+
// TODO: Replace with your actual SDK key and feature flag name
9+
String sdkKey = "h1diffat7nmej6kulfdr4ectghnjc1quqa3c";
10+
String featureFlagName = "TEST_MALDO";
11+
String customerId = "CUSTOMER_ID";
12+
13+
SplitClientConfig config = SplitClientConfig.builder()
14+
.setBlockUntilReadyTimeout(10000)
15+
.enableDebug()
16+
.endpoint("https://sdk.split-stage.io", "https://events.split-stage.io/api")
17+
.build();
18+
SplitFactory splitFactory = SplitFactoryBuilder.build(sdkKey, config);
19+
SplitClient client = splitFactory.client();
20+
try {
21+
client.blockUntilReady();
22+
} catch (Exception e) {
23+
System.err.println("Error waiting for Split SDK to be ready: " + e.getMessage());
24+
e.printStackTrace();
25+
}
26+
27+
String treatment = client.getTreatment(customerId, featureFlagName);
28+
System.out.println("Treatment for user '" + customerId + "' and flag '" + featureFlagName + "': " + treatment);
29+
if (treatment.equals("on")) {
30+
System.out.println("Feature flag is enabled for this user!");
31+
} else if (treatment.equals("off")) {
32+
System.out.println("Feature flag is disabled for this user!");
33+
} else {
34+
System.out.println("Unable to perform evaluation.");
35+
}
36+
37+
while (true) {
38+
39+
}
40+
}
41+
}

0 commit comments

Comments
 (0)