Skip to content

Commit 6bf04a3

Browse files
authored
chore: upgrade to v1 (#4)
1 parent a75dd92 commit 6bf04a3

3 files changed

Lines changed: 9 additions & 19 deletions

File tree

.github/workflows/checks.yml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ jobs:
1212
ci:
1313
runs-on: ubuntu-latest
1414

15+
env:
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
1518
strategy:
1619
matrix:
1720
java-version: [24]
@@ -26,23 +29,9 @@ jobs:
2629
java-version: ${{ matrix.java-version }}
2730
distribution: "temurin"
2831
cache: "maven"
29-
30-
- name: Set up settings.xml
31-
run: |
32-
mkdir -p ~/.m2
33-
echo '<?xml version="1.0" encoding="UTF-8"?>
34-
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
35-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
36-
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
37-
http://maven.apache.org/xsd/settings-1.0.0.xsd">
38-
<servers>
39-
<server>
40-
<id>github</id>
41-
<username>${{ secrets.GH_USERNAME }}</username>
42-
<password>${{ secrets.GH_TOKEN }}</password>
43-
</server>
44-
</servers>
45-
</settings>' > ~/.m2/settings.xml
32+
server-id: github
33+
server-username: GITHUB_ACTOR
34+
server-password: GITHUB_TOKEN
4635

4736
- name: Build with Maven
4837
run: mvn clean compile

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<dependency>
3232
<groupId>com.featurevisor</groupId>
3333
<artifactId>featurevisor-java</artifactId>
34-
<version>0.1.0</version>
34+
<version>1.0.0</version>
3535
</dependency>
3636
<dependency>
3737
<groupId>com.fasterxml.jackson.core</groupId>

src/main/java/com/example/App.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ public static void main(String[] args) {
1515
System.out.println("Fetched JSON content");
1616

1717
// Create Featurevisor SDK instance with the datafile content
18-
Featurevisor instance = Featurevisor.createInstance(jsonContent);
18+
Featurevisor instance = Featurevisor.createFeaturevisor(
19+
new Featurevisor.FeaturevisorOptions().datafileString(jsonContent));
1920

2021
// evaluate feature
2122
boolean isFeatureEnabled = instance.isEnabled("my_feature");

0 commit comments

Comments
 (0)