Skip to content

Commit cda2230

Browse files
committed
Migrate JinjavaConfig and other manual builder patterns to use
Value.Immutable
1 parent 0052c9d commit cda2230

17 files changed

+312
-725
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ You will likely want to provide your own implementation of
7878
`ResourceLoader` to hook into your application's template repository, and then tell jinjava about it:
7979

8080
```java
81-
JinjavaConfig config = new JinjavaConfig();
81+
JinjavaConfig config = JinjavaConfig.builder().build();
8282

8383
Jinjava jinjava = new Jinjava(config);
8484
jinjava.setResourceLocator(new MyCustomResourceLocator());
@@ -87,7 +87,7 @@ jinjava.setResourceLocator(new MyCustomResourceLocator());
8787
To use more than one `ResourceLocator`, use a `CascadingResourceLocator`.
8888

8989
```java
90-
JinjavaConfig config = new JinjavaConfig();
90+
JinjavaConfig config = JinjavaConfig.builder().build();
9191

9292
Jinjava jinjava = new Jinjava(config);
9393
jinjava.setResourceLocator(new MyCustomResourceLocator(), new FileResourceLocator());

pom.xml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@
184184
<dependency>
185185
<groupId>com.google.errorprone</groupId>
186186
<artifactId>error_prone_annotations</artifactId>
187+
<scope>runtime</scope>
187188
</dependency>
188189

189190
<dependency>
@@ -216,19 +217,11 @@
216217
<artifactId>value</artifactId>
217218
<scope>provided</scope>
218219
</dependency>
219-
<dependency>
220-
<groupId>com.hubspot.immutables</groupId>
221-
<artifactId>hubspot-style</artifactId>
222-
<scope>provided</scope>
223-
</dependency>
224-
<dependency>
225-
<groupId>com.hubspot.immutables</groupId>
226-
<artifactId>immutables-exceptions</artifactId>
227-
</dependency>
228220
<dependency>
229221
<groupId>com.hubspot</groupId>
230222
<artifactId>algebra</artifactId>
231223
</dependency>
224+
232225
</dependencies>
233226

234227
<build>

src/main/java/com/hubspot/jinjava/Jinjava.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public class Jinjava {
7474
* Create a new Jinjava processor instance with the default global config
7575
*/
7676
public Jinjava() {
77-
this(new JinjavaConfig());
77+
this(JinjavaConfig.builder().build());
7878
}
7979

8080
/**

0 commit comments

Comments
 (0)