File tree Expand file tree Collapse file tree
openfeature-provider-local
java/com/spotify/confidence Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66/target /
77* /target /
88* .iml
9- ** dependency-reduced-pom.xml
9+ ** dependency-reduced-pom.xml
10+ openfeature-provider-local /src /main /resources /wasm /confidence_resolver.wasm
Original file line number Diff line number Diff line change 1818 <!-- Prevents the compiler version from resetting locally in Intellij -->
1919 <maven .compiler.source>17</maven .compiler.source>
2020 <maven .compiler.target>17</maven .compiler.target>
21+ <!-- WASM file version. When updated, make sure to mvn clean to force a new download -->
22+ <confidence .resolver.wasm.version>v0.2.0</confidence .resolver.wasm.version>
2123 </properties >
2224
2325
153155 </dependencies >
154156
155157 <build >
158+ <plugins >
159+ <!-- Plugin to clean WASM file during clean phase -->
160+ <plugin >
161+ <groupId >org.apache.maven.plugins</groupId >
162+ <artifactId >maven-clean-plugin</artifactId >
163+ <version >3.3.2</version >
164+ <configuration >
165+ <filesets >
166+ <fileset >
167+ <directory >src/main/resources/wasm</directory >
168+ <includes >
169+ <include >confidence_resolver.wasm</include >
170+ </includes >
171+ </fileset >
172+ </filesets >
173+ </configuration >
174+ </plugin >
175+
176+ <!-- Plugin to download WASM file during generate-resources phase -->
177+ <plugin >
178+ <groupId >org.apache.maven.plugins</groupId >
179+ <artifactId >maven-antrun-plugin</artifactId >
180+ <version >3.1.0</version >
181+ <executions >
182+ <execution >
183+ <id >download-wasm</id >
184+ <phase >generate-resources</phase >
185+ <goals >
186+ <goal >run</goal >
187+ </goals >
188+ <configuration >
189+ <target >
190+ <mkdir dir =" src/main/resources/wasm" />
191+ <get src =" https://github.com/spotify/confidence-resolver-rust/releases/download/confidence_resolver-${confidence.resolver.wasm.version}/confidence_resolver.wasm"
192+ dest =" src/main/resources/wasm/confidence_resolver.wasm"
193+ skipexisting =" true"
194+ verbose =" true" />
195+ </target >
196+ </configuration >
197+ </execution >
198+ </executions >
199+ </plugin >
200+ </plugins >
201+
156202 <resources >
157203 <resource >
158204 <directory >src/main/resources</directory >
Original file line number Diff line number Diff line change @@ -53,9 +53,9 @@ class WasmResolveApi {
5353 public WasmResolveApi (FlagLogger flagLogger ) {
5454 this .flagLogger = flagLogger ;
5555 try (InputStream wasmStream =
56- getClass ().getClassLoader ().getResourceAsStream ("wasm/rust_guest .wasm" )) {
56+ getClass ().getClassLoader ().getResourceAsStream ("wasm/confidence_resolver .wasm" )) {
5757 if (wasmStream == null ) {
58- throw new RuntimeException ("Could not find rust_guest .wasm in resources" );
58+ throw new RuntimeException ("Could not find confidence_resolver .wasm in resources" );
5959 }
6060 final WasmModule module = Parser .parse (wasmStream );
6161 instance =
Original file line number Diff line number Diff line change 493493 </ignoredClassPatterns >
494494 </configuration >
495495 </plugin >
496+
496497 </plugins >
497498 </build >
499+
498500</project >
You can’t perform that action at this time.
0 commit comments