diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 5db69c9..fea4d07 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -12,6 +12,9 @@ jobs: ci: runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + strategy: matrix: java-version: [24] @@ -26,23 +29,9 @@ jobs: java-version: ${{ matrix.java-version }} distribution: "temurin" cache: "maven" - - - name: Set up settings.xml - run: | - mkdir -p ~/.m2 - echo ' - - - - github - ${{ secrets.GH_USERNAME }} - ${{ secrets.GH_TOKEN }} - - - ' > ~/.m2/settings.xml + server-id: github + server-username: GITHUB_ACTOR + server-password: GITHUB_TOKEN - name: Build with Maven run: mvn clean compile diff --git a/pom.xml b/pom.xml index d068acb..63e3e0d 100644 --- a/pom.xml +++ b/pom.xml @@ -31,7 +31,7 @@ com.featurevisor featurevisor-java - 0.1.0 + 1.0.0 com.fasterxml.jackson.core diff --git a/src/main/java/com/example/App.java b/src/main/java/com/example/App.java index d181c96..12e8d16 100644 --- a/src/main/java/com/example/App.java +++ b/src/main/java/com/example/App.java @@ -15,7 +15,8 @@ public static void main(String[] args) { System.out.println("Fetched JSON content"); // Create Featurevisor SDK instance with the datafile content - Featurevisor instance = Featurevisor.createInstance(jsonContent); + Featurevisor instance = Featurevisor.createFeaturevisor( + new Featurevisor.FeaturevisorOptions().datafileString(jsonContent)); // evaluate feature boolean isFeatureEnabled = instance.isEnabled("my_feature");