Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions base/src/main/proto/spine/options.proto
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ extend google.protobuf.MessageOptions {
// In the example above, `CreateProject` message is a `ProjectCommand`.
//
// To specify a characteristic for every message in a `.proto` file, use `(every_is)` file
// option. If both `(is)` and `(every_is)` options are found, `(is)` value is taken.
// option. If both `(is)` and `(every_is)` options are found, both are applied.
//
// When targeting Java, specify the name of a Java interface to be implemented by this
// message via `(is).java_type`.
Expand Down Expand Up @@ -492,7 +492,7 @@ extend google.protobuf.FileOptions {
// messages are `ProjectCommand`-s.
//
// To specify a characteristic for a single message, use `(is)` message option. If both `(is)`
// and `(every_is)` options are found, `(is)` value is taken.
// and `(every_is)` options are found, both are applied.
//
// When targeting Java, specify the name of a Java interface to be implemented by these
// message types via `(every_is).java_type`.
Expand Down Expand Up @@ -825,5 +825,8 @@ message IsOption {
// name. When a simple name is set in the option, the package of the interface matches the
// package of the message class.
//
// If both `(is)` and `(every_is)` options specify a Java interface, the message class
// implements both interfaces.
//
string java_type = 2;
}
60 changes: 30 additions & 30 deletions license-report.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


# Dependencies of `io.spine:spine-base:1.5.10`
# Dependencies of `io.spine:spine-base:1.5.11`

## Runtime
1. **Group:** com.google.code.findbugs **Name:** jsr305 **Version:** 3.0.2
Expand Down Expand Up @@ -328,12 +328,12 @@
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.


This report was generated on **Mon Apr 27 17:38:32 EEST 2020** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
This report was generated on **Mon Apr 27 19:58:27 EEST 2020** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine.tools:spine-errorprone-checks:1.5.10`
# Dependencies of `io.spine.tools:spine-errorprone-checks:1.5.11`

## Runtime
1. **Group:** com.github.ben-manes.caffeine **Name:** caffeine **Version:** 2.7.0
Expand Down Expand Up @@ -773,12 +773,12 @@ This report was generated on **Mon Apr 27 17:38:32 EEST 2020** using [Gradle-Lic
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.


This report was generated on **Mon Apr 27 17:38:33 EEST 2020** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
This report was generated on **Mon Apr 27 19:58:28 EEST 2020** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine.tools:spine-javadoc-filter:1.5.10`
# Dependencies of `io.spine.tools:spine-javadoc-filter:1.5.11`

## Runtime
1. **Group:** com.google.android **Name:** annotations **Version:** 4.1.1.4
Expand Down Expand Up @@ -1156,12 +1156,12 @@ This report was generated on **Mon Apr 27 17:38:33 EEST 2020** using [Gradle-Lic
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.


This report was generated on **Mon Apr 27 17:38:34 EEST 2020** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
This report was generated on **Mon Apr 27 19:58:29 EEST 2020** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine.tools:spine-javadoc-prettifier:1.5.10`
# Dependencies of `io.spine.tools:spine-javadoc-prettifier:1.5.11`

## Runtime
1. **Group:** com.google.code.findbugs **Name:** jsr305 **Version:** 3.0.2
Expand Down Expand Up @@ -1521,12 +1521,12 @@ This report was generated on **Mon Apr 27 17:38:34 EEST 2020** using [Gradle-Lic
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.


This report was generated on **Mon Apr 27 17:38:34 EEST 2020** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
This report was generated on **Mon Apr 27 19:58:29 EEST 2020** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine.tools:spine-model-compiler:1.5.10`
# Dependencies of `io.spine.tools:spine-model-compiler:1.5.11`

## Runtime
1. **Group:** com.google.code.findbugs **Name:** jsr305 **Version:** 3.0.2
Expand Down Expand Up @@ -1902,12 +1902,12 @@ This report was generated on **Mon Apr 27 17:38:34 EEST 2020** using [Gradle-Lic
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.


This report was generated on **Mon Apr 27 17:38:35 EEST 2020** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
This report was generated on **Mon Apr 27 19:58:30 EEST 2020** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine.tools:spine-mute-logging:1.5.10`
# Dependencies of `io.spine.tools:spine-mute-logging:1.5.11`

## Runtime
1. **Group:** com.google.auto.value **Name:** auto-value-annotations **Version:** 1.6.3
Expand Down Expand Up @@ -2281,12 +2281,12 @@ This report was generated on **Mon Apr 27 17:38:35 EEST 2020** using [Gradle-Lic
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.


This report was generated on **Mon Apr 27 17:38:35 EEST 2020** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
This report was generated on **Mon Apr 27 19:58:30 EEST 2020** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine.tools:spine-plugin-base:1.5.10`
# Dependencies of `io.spine.tools:spine-plugin-base:1.5.11`

## Runtime
1. **Group:** com.google.code.findbugs **Name:** jsr305 **Version:** 3.0.2
Expand Down Expand Up @@ -2646,12 +2646,12 @@ This report was generated on **Mon Apr 27 17:38:35 EEST 2020** using [Gradle-Lic
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.


This report was generated on **Mon Apr 27 17:38:36 EEST 2020** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
This report was generated on **Mon Apr 27 19:58:31 EEST 2020** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine.tools:spine-plugin-testlib:1.5.10`
# Dependencies of `io.spine.tools:spine-plugin-testlib:1.5.11`

## Runtime
1. **Group:** com.google.auto.value **Name:** auto-value-annotations **Version:** 1.6.3
Expand Down Expand Up @@ -3065,12 +3065,12 @@ This report was generated on **Mon Apr 27 17:38:36 EEST 2020** using [Gradle-Lic
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.


This report was generated on **Mon Apr 27 17:38:36 EEST 2020** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
This report was generated on **Mon Apr 27 19:58:31 EEST 2020** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine.tools:spine-proto-dart-plugin:1.5.10`
# Dependencies of `io.spine.tools:spine-proto-dart-plugin:1.5.11`

## Runtime
1. **Group:** com.google.code.findbugs **Name:** jsr305 **Version:** 3.0.2
Expand Down Expand Up @@ -3430,12 +3430,12 @@ This report was generated on **Mon Apr 27 17:38:36 EEST 2020** using [Gradle-Lic
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.


This report was generated on **Mon Apr 27 17:38:37 EEST 2020** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
This report was generated on **Mon Apr 27 19:58:32 EEST 2020** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine.tools:spine-proto-js-plugin:1.5.10`
# Dependencies of `io.spine.tools:spine-proto-js-plugin:1.5.11`

## Runtime
1. **Group:** com.google.code.findbugs **Name:** jsr305 **Version:** 3.0.2
Expand Down Expand Up @@ -3795,12 +3795,12 @@ This report was generated on **Mon Apr 27 17:38:37 EEST 2020** using [Gradle-Lic
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.


This report was generated on **Mon Apr 27 17:38:37 EEST 2020** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
This report was generated on **Mon Apr 27 19:58:32 EEST 2020** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine.tools:spine-protoc-api:1.5.10`
# Dependencies of `io.spine.tools:spine-protoc-api:1.5.11`

## Runtime
1. **Group:** com.google.code.findbugs **Name:** jsr305 **Version:** 3.0.2
Expand Down Expand Up @@ -4120,12 +4120,12 @@ This report was generated on **Mon Apr 27 17:38:37 EEST 2020** using [Gradle-Lic
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.


This report was generated on **Mon Apr 27 17:38:37 EEST 2020** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
This report was generated on **Mon Apr 27 19:58:33 EEST 2020** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine.tools:spine-protoc-plugin:1.5.10`
# Dependencies of `io.spine.tools:spine-protoc-plugin:1.5.11`

## Runtime
1. **Group:** com.google.code.findbugs **Name:** jsr305 **Version:** 3.0.2
Expand Down Expand Up @@ -4453,12 +4453,12 @@ This report was generated on **Mon Apr 27 17:38:37 EEST 2020** using [Gradle-Lic
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.


This report was generated on **Mon Apr 27 17:38:38 EEST 2020** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
This report was generated on **Mon Apr 27 19:58:33 EEST 2020** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine:spine-testlib:1.5.10`
# Dependencies of `io.spine:spine-testlib:1.5.11`

## Runtime
1. **Group:** com.google.auto.value **Name:** auto-value-annotations **Version:** 1.6.3
Expand Down Expand Up @@ -4832,12 +4832,12 @@ This report was generated on **Mon Apr 27 17:38:38 EEST 2020** using [Gradle-Lic
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.


This report was generated on **Mon Apr 27 17:38:38 EEST 2020** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
This report was generated on **Mon Apr 27 19:58:33 EEST 2020** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine.tools:spine-tool-base:1.5.10`
# Dependencies of `io.spine.tools:spine-tool-base:1.5.11`

## Runtime
1. **Group:** com.google.code.findbugs **Name:** jsr305 **Version:** 3.0.2
Expand Down Expand Up @@ -5165,12 +5165,12 @@ This report was generated on **Mon Apr 27 17:38:38 EEST 2020** using [Gradle-Lic
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.


This report was generated on **Mon Apr 27 17:38:38 EEST 2020** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
This report was generated on **Mon Apr 27 19:58:34 EEST 2020** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine.tools:spine-validation-generator:1.5.10`
# Dependencies of `io.spine.tools:spine-validation-generator:1.5.11`

## Runtime
1. **Group:** com.google.code.findbugs **Name:** jsr305 **Version:** 3.0.2
Expand Down Expand Up @@ -5498,4 +5498,4 @@ This report was generated on **Mon Apr 27 17:38:38 EEST 2020** using [Gradle-Lic
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.


This report was generated on **Mon Apr 27 17:38:39 EEST 2020** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
This report was generated on **Mon Apr 27 19:58:34 EEST 2020** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ all modules and does not describe the project structure per-subproject.

<groupId>io.spine</groupId>
<artifactId>spine-base</artifactId>
<version>1.5.10</version>
<version>1.5.11</version>

<inceptionYear>2015</inceptionYear>

Expand Down Expand Up @@ -154,7 +154,7 @@ all modules and does not describe the project structure per-subproject.
<dependency>
<groupId>io.spine.tools</groupId>
<artifactId>spine-protoc-plugin</artifactId>
<version>1.5.10</version>
<version>1.5.11</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion tools/protoc-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ message Hamster {
}
```

If both `(is)` and `(every_is)` options are found, `(is)` value is taken.
If both `(is)` and `(every_is)` options are found, both are applied.

Also, both `(is)` and `(every_is)` options support shorter syntax with no explicit package
declaration. In this case, the package of the current file (either `java_package` or Protobuf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
* The {@link CodeGenerator} implementation generating the specific interfaces implemented by
* some message types.
*
* <p>This generator processes interfaces obtained from {@code (is)} and {@code (every_is)} options
* as well as interfaces defined for {@linkplain CodeGenerationTask file patterns}.
*
* <p>The generator produces two types of {@link File CodeGeneratorResponse.File} instances
* representing:
* <ul>
Expand Down Expand Up @@ -101,18 +104,13 @@ protected Collection<CompilerOutput> generate(Type<?, ?> type) {
}

private ImmutableList<CompilerOutput> processMessageType(MessageType type) {
ImmutableList.Builder<CompilerOutput> result = ImmutableList.builder();

ImmutableList<CompilerOutput> matched = codeGenerationTasks.generateFor(type);
result.addAll(matched);

Collection<CompilerOutput> fromMsgOption = MessageAndInterface.scanMsgOption(type);
result.addAll(fromMsgOption);

if (fromMsgOption.isEmpty()) {
Collection<CompilerOutput> fromFileOption = MessageAndInterface.scanFileOption(type);
result.addAll(fromFileOption);
}
return result.build();
Collection<CompilerOutput> fromFileOption = MessageAndInterface.scanFileOption(type);
return ImmutableList.<CompilerOutput>builder()
.addAll(matched)
.addAll(fromMsgOption)
.addAll(fromFileOption)
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ void implementInterfaceInGeneratedMessagesWithIsOption() {
}

@Test
@DisplayName("use `IS` in priority to `EVERY IS`")
@DisplayName("use `IS` and `EVERY IS` together")
void useIsInPriorityToEveryIs() {
assertThat(PIUserCreated.getDefaultInstance()).isInstanceOf(PIUserEvent.class);
assertThat(PIUserNameUpdated.getDefaultInstance()).isInstanceOf(PIUserEvent.class);

assertThat(UserName.getDefaultInstance()).isNotInstanceOf(PIUserEvent.class);
assertThat(UserName.getDefaultInstance()).isInstanceOf(PIUserEvent.class);
assertThat(UserName.getDefaultInstance()).isInstanceOf(UserInfo.class);
}

Expand Down
2 changes: 1 addition & 1 deletion version.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* as we want to manage the versions in a single source.
*/

final def SPINE_VERSION = '1.5.10'
final def SPINE_VERSION = '1.5.11'

ext {
spineVersion = SPINE_VERSION
Expand Down