Skip to content

Commit 7f03365

Browse files
committed
release 1.8.3
1 parent 9472b6a commit 7f03365

File tree

5 files changed

+71
-58
lines changed

5 files changed

+71
-58
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ If you're not familiar with `rm`'s `--` option, try `echo >>-f` and deleting the
134134
<dependency>
135135
<groupId>com.github.h908714124</groupId>
136136
<artifactId>jbock</artifactId>
137-
<version>1.8.2</version>
137+
<version>1.8.3</version>
138138
<scope>provided</scope>
139139
</dependency>
140140
````

core/pom.xml

Lines changed: 47 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -28,41 +28,48 @@
2828
</dependency>
2929

3030
<!-- Test -->
31-
<dependency>
32-
<groupId>junit</groupId>
33-
<artifactId>junit</artifactId>
34-
<version>4.12</version>
35-
<scope>test</scope>
36-
</dependency>
3731

38-
<dependency>
39-
<groupId>com.google.testing.compile</groupId>
40-
<artifactId>compile-testing</artifactId>
41-
<version>0.10</version>
42-
<scope>test</scope>
43-
</dependency>
32+
<!--
33+
test dependencies removed
34+
until https://github.com/google/compile-testing/issues/134 is resolved
35+
-->
4436

45-
<dependency>
46-
<groupId>com.google.guava</groupId>
47-
<artifactId>guava</artifactId>
48-
<version>20.0</version>
49-
<scope>test</scope>
50-
</dependency>
37+
<!--
38+
<dependency>
39+
<groupId>com.google.testing.compile</groupId>
40+
<artifactId>compile-testing</artifactId>
41+
<version>0.12</version>
42+
<scope>test</scope>
43+
</dependency>
44+
<dependency>
45+
<groupId>com.google.guava</groupId>
46+
<artifactId>guava</artifactId>
47+
<version>20.0</version>
48+
<scope>test</scope>
49+
</dependency>
50+
51+
<dependency>
52+
<groupId>com.google.truth</groupId>
53+
<artifactId>truth</artifactId>
54+
<version>0.32</version>
55+
<scope>test</scope>
56+
</dependency>
57+
<dependency>
58+
<groupId>junit</groupId>
59+
<artifactId>junit</artifactId>
60+
<version>4.12</version>
61+
<scope>test</scope>
62+
</dependency>
63+
-->
5164

52-
<dependency>
53-
<groupId>com.google.truth</groupId>
54-
<artifactId>truth</artifactId>
55-
<version>0.32</version>
56-
<scope>test</scope>
57-
</dependency>
5865
</dependencies>
5966

6067
<build>
6168
<plugins>
6269
<plugin>
6370
<groupId>org.apache.maven.plugins</groupId>
6471
<artifactId>maven-compiler-plugin</artifactId>
65-
<version>3.6.1</version>
72+
<version>3.7.0</version>
6673
<configuration>
6774
<source>8</source>
6875
<target>8</target>
@@ -73,7 +80,7 @@
7380
<plugin>
7481
<groupId>org.apache.maven.plugins</groupId>
7582
<artifactId>maven-shade-plugin</artifactId>
76-
<version>3.0.0</version>
83+
<version>3.1.0</version>
7784
<configuration>
7885
<minimizeJar>true</minimizeJar>
7986
<relocations>
@@ -95,4 +102,18 @@
95102
</plugins>
96103
</build>
97104

105+
<profiles>
106+
<profile>
107+
<id>sonatype-oss-release</id>
108+
<build>
109+
<plugins>
110+
<plugin>
111+
<groupId>org.apache.maven.plugins</groupId>
112+
<artifactId>maven-javadoc-plugin</artifactId>
113+
<version>3.0.0-M1</version>
114+
</plugin>
115+
</plugins>
116+
</build>
117+
</profile>
118+
</profiles>
98119
</project>

core/src/main/java/net/jbock/compiler/Analyser.java

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
package net.jbock.compiler;
22

3-
import com.squareup.javapoet.AnnotationSpec;
3+
import static com.squareup.javapoet.TypeName.INT;
4+
import static javax.lang.model.element.Modifier.FINAL;
5+
import static javax.lang.model.element.Modifier.PRIVATE;
6+
import static javax.lang.model.element.Modifier.PUBLIC;
7+
import static javax.lang.model.element.Modifier.STATIC;
8+
49
import com.squareup.javapoet.ArrayTypeName;
510
import com.squareup.javapoet.ClassName;
611
import com.squareup.javapoet.CodeBlock;
@@ -10,9 +15,6 @@
1015
import com.squareup.javapoet.ParameterizedTypeName;
1116
import com.squareup.javapoet.TypeName;
1217
import com.squareup.javapoet.TypeSpec;
13-
import net.jbock.compiler.Processor.Context;
14-
15-
import javax.annotation.Generated;
1618
import java.util.ArrayList;
1719
import java.util.Arrays;
1820
import java.util.EnumMap;
@@ -21,12 +23,7 @@
2123
import java.util.List;
2224
import java.util.Map;
2325
import java.util.Set;
24-
25-
import static com.squareup.javapoet.TypeName.INT;
26-
import static javax.lang.model.element.Modifier.FINAL;
27-
import static javax.lang.model.element.Modifier.PRIVATE;
28-
import static javax.lang.model.element.Modifier.PUBLIC;
29-
import static javax.lang.model.element.Modifier.STATIC;
26+
import net.jbock.compiler.Processor.Context;
3027

3128
final class Analyser {
3229

@@ -132,7 +129,7 @@ TypeSpec analyse() {
132129
.addType(option.define())
133130
.addType(Binder.create(this).define())
134131
.addType(OptionType.define(optionTypeClass))
135-
.addAnnotation(generatedAnnotation())
132+
.addJavadoc(generatedInfo())
136133
.addMethod(parseMethod())
137134
.addMethod(read)
138135
.addMethod(readOption)
@@ -325,10 +322,10 @@ private static MethodSpec readMethod(
325322
.build();
326323
}
327324

328-
private AnnotationSpec generatedAnnotation() {
329-
return AnnotationSpec.builder(Generated.class)
330-
.addMember("value", "$S", Processor.class.getName())
331-
.build();
325+
private CodeBlock generatedInfo() {
326+
return CodeBlock.builder().add("Generated by $L\n\n" +
327+
"@see <a href=\"https://github.com/h908714124/\">jbock on github</a>\n",
328+
Processor.class.getName()).build();
332329
}
333330

334331
private MethodSpec privateConstructor() {

core/src/test/java/net/jbock/compiler/ProcessorTest.java

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
package net.jbock.compiler;
22

3-
import org.junit.Test;
4-
5-
import javax.tools.JavaFileObject;
6-
import java.util.Arrays;
7-
import java.util.List;
8-
9-
import static com.google.common.truth.Truth.assertAbout;
10-
import static com.google.testing.compile.JavaFileObjects.forSourceLines;
11-
import static com.google.testing.compile.JavaSourcesSubjectFactory.javaSources;
12-
import static java.util.Collections.singletonList;
13-
143
public class ProcessorTest {
4+
/*
5+
test disabled
6+
until https://github.com/google/compile-testing/issues/134 is resolved
7+
*/
8+
9+
/*
1510
1611
@Test
1712
public void process() throws Exception {
@@ -150,4 +145,5 @@ public void everythingAfterCollidesWithOption() throws Exception {
150145
.failsToCompile()
151146
.withErrorContaining("@EverythingAfter coincides with a long option");
152147
}
153-
}
148+
*/
149+
}

examples/pom.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,15 @@
3333
<plugin>
3434
<groupId>org.apache.maven.plugins</groupId>
3535
<artifactId>maven-compiler-plugin</artifactId>
36-
<version>3.6.1</version>
36+
<version>3.7.0</version>
3737
<configuration>
38-
<source>8</source>
39-
<target>8</target>
38+
<source>1.9</source>
39+
<target>1.9</target>
4040
</configuration>
4141
</plugin>
4242
<plugin>
4343
<groupId>org.apache.maven.plugins</groupId>
4444
<artifactId>maven-install-plugin</artifactId>
45-
<version>2.5.2</version>
4645
<executions>
4746
<execution>
4847
<id>default-install</id>

0 commit comments

Comments
 (0)