Skip to content

Commit 1eee27f

Browse files
Merge pull request #78 from SpineEventEngine/release/v1.7.0
Release v1.7.0
2 parents ed3ea82 + e5e6fc0 commit 1eee27f

53 files changed

Lines changed: 441 additions & 34 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.codacy.yaml

Lines changed: 0 additions & 3 deletions
This file was deleted.

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
#
22
# Copyright 2020, TeamDev. All rights reserved.
33
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
410
# Redistribution and use in source and/or binary forms, with or without
511
# modification, must retain the above copyright notice and the following
612
# disclaimer.

.idea/copyright/TeamDev_Open_Source.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 46 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,66 @@
11
# bootstrap
22

3-
[![Build Status](https://travis-ci.com/SpineEventEngine/bootstrap.svg?branch=master)](https://travis-ci.com/SpineEventEngine/bootstrap)
3+
[![Build Status][badge]](https://travis-ci.com/SpineEventEngine/bootstrap)
44

55
The Gradle plugin for bootstrapping projects built with Spine.
66

7+
[badge]: https://travis-ci.com/SpineEventEngine/bootstrap.svg?branch=master
8+
79
## Applying to the project
810

911
In order to apply the plugin to a Gradle project, in `build.gralde` add the following config:
12+
1013
```gradle
1114
plugins {
12-
id("io.spine.tools.gradle.bootstrap").version("1.6.0")
15+
id("io.spine.tools.gradle.bootstrap").version("1.7.0")
1316
}
1417
```
1518

16-
See [this Gradle doc](https://docs.gradle.org/current/userguide/plugins.html#sec:subprojects_plugins_dsl)
17-
on how to apply a plugin only to certain to subprojects.
19+
See [this Gradle doc][gradle-plugins-dsl] on how to apply a plugin only to certain to subprojects.
20+
21+
[gradle-plugins-dsl]: https://docs.gradle.org/current/userguide/plugins.html#sec:subprojects_plugins_dsl
1822

1923
## Java Projects
2024

2125
In order to mark a (sub-)project as a Java project for Spine, apply the following config:
26+
2227
```gradle
2328
spine.enableJava()
2429
```
2530

2631
This configuration:
32+
2733
- applies `java` Gradle plugin;
34+
2835
- applies `com.google.protobuf` Gradle plugin;
36+
2937
- configures Java code generation from Protobuf;
38+
3039
- adds a dependency onto the `io.spine:spine-base` module;
40+
3141
- applies the Spine Model Compiler plugin and performs its minimal configuration.
3242

3343
More often than not, a user would also like to mark a Java project as a client or a server module.
3444
To do that, apply the following configuration:
35-
- for client modules:
36-
```gradle
37-
spine.enableJava().client()
38-
```
39-
- for server modules:
40-
```gradle
41-
spine.enableJava().server()
42-
```
45+
46+
- for client modules:
47+
48+
```gradle
49+
spine.enableJava().client()
50+
```
51+
52+
- for server modules:
53+
```gradle
54+
spine.enableJava().server()
55+
```
4356
4457
This config will add required dependencies for developing a Spine-based Java client and server
4558
respectively.
4659
4760
### Obtaining the version when adding other dependencies
4861
49-
In order to use the same version for other Spine libraries, please use `sine.version()`. For example, adding testing utilities would look like this:
62+
In order to use the same version for other Spine libraries, please use `spine.version()`.
63+
For example, adding testing utilities would look like this:
5064
5165
```gradle
5266
dependencies {
@@ -62,6 +76,7 @@ Spine relies on [gRPC](https://grpc.io/).
6276
All the required gRPC Java stubs and services are already included into the Spine artifacts.
6377
However, if users would like to declare gRPC services of their own, they may use the following
6478
configuration to set up the generation seamlessly:
79+
6580
```gradle
6681
spine.enableJava {
6782
codegen {
@@ -81,6 +96,7 @@ is not added by default in order not to cause clashes in the user projects.
8196

8297
Sometimes, the users might not want any Java code to be generated. For such cases, the plugin
8398
provides following configuration opportunity:
99+
84100
```gradle
85101
spine.enableJava {
86102
codegen {
@@ -89,11 +105,13 @@ spine.enableJava {
89105
}
90106
}
91107
```
108+
92109
This way, no Java code will be generated at all, including Protobuf messages, gRPC services,
93110
validating builders, and rejections.
94111

95112
A user also may leave the Java Protobuf codegen enabled, but only turn off Spine-specific code
96113
generation:
114+
97115
```gradle
98116
spine.enableJava {
99117
codegen {
@@ -105,6 +123,7 @@ spine.enableJava {
105123
## JavaScript Projects
106124

107125
In order to mark a (sub-)project as a JS project for Spine, apply the following config:
126+
108127
```gradle
109128
spine.enableJavaScript()
110129
```
@@ -114,3 +133,17 @@ This configuration:
114133
- configures JS code generation from Protobuf.
115134

116135
If only JS generation is configured, the Java code will not be generated (and the other way around).
136+
137+
## Dart Projects
138+
139+
In order to mark a (sub-)project as a Dart project for Spine, apply the following config:
140+
141+
```gradle
142+
spine.enableDart()
143+
```
144+
145+
This configuration:
146+
- applies `com.google.protobuf` and `java` Gradle plugin (as the former depends on the latter);
147+
- configures Dart code generation from Protobuf.
148+
149+
If only Dart generation is configured, the Java code will not be generated (and the other way around).

build.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
/*
22
* Copyright 2020, TeamDev. All rights reserved.
33
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
410
* Redistribution and use in source and/or binary forms, with or without
511
* modification, must retain the above copyright notice and the following
612
* disclaimer.

buildSrc/build.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
/*
22
* Copyright 2020, TeamDev. All rights reserved.
33
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
410
* Redistribution and use in source and/or binary forms, with or without
511
* modification, must retain the above copyright notice and the following
612
* disclaimer.

buildSrc/src/main/kotlin/bootstrap-plugin.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
/*
22
* Copyright 2020, TeamDev. All rights reserved.
33
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
410
* Redistribution and use in source and/or binary forms, with or without
511
* modification, must retain the above copyright notice and the following
612
* disclaimer.

buildSrc/src/main/kotlin/io/spine/gradle/internal/CheckVersionIncrement.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
/*
22
* Copyright 2020, TeamDev. All rights reserved.
33
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
410
* Redistribution and use in source and/or binary forms, with or without
511
* modification, must retain the above copyright notice and the following
612
* disclaimer.

buildSrc/src/main/kotlin/io/spine/gradle/internal/IncrementGuard.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
/*
22
* Copyright 2020, TeamDev. All rights reserved.
33
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
410
* Redistribution and use in source and/or binary forms, with or without
511
* modification, must retain the above copyright notice and the following
612
* disclaimer.

buildSrc/src/main/kotlin/io/spine/gradle/internal/RunBuild.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
/*
22
* Copyright 2020, TeamDev. All rights reserved.
33
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
410
* Redistribution and use in source and/or binary forms, with or without
511
* modification, must retain the above copyright notice and the following
612
* disclaimer.

0 commit comments

Comments
 (0)