Skip to content

Commit f5b00d2

Browse files
Merge pull request #166 from SpineEventEngine/more-tests
2 parents cfefc53 + 7f5f8e8 commit f5b00d2

33 files changed

+577
-1056
lines changed

.idea/inspectionProfiles/Project_Default.xml

+4-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle.kts

-2
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,9 @@ spinePublishing {
5757
"java",
5858
"java-bundle",
5959
"java-runtime",
60-
"java-runtime-bundle",
6160
)
6261
modulesWithCustomPublishing = setOf(
6362
"java-bundle",
64-
"java-runtime-bundle"
6563
)
6664
destinations = with(PublishingRepos) {
6765
setOf(

buildSrc/src/main/kotlin/DependencyResolution.kt

+3-2
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ import io.spine.dependency.lib.Okio
4646
import io.spine.dependency.lib.Plexus
4747
import io.spine.dependency.lib.Protobuf
4848
import io.spine.dependency.lib.Slf4J
49+
import io.spine.dependency.local.Base
4950
import io.spine.dependency.local.Spine
5051
import io.spine.dependency.test.Hamcrest
5152
import io.spine.dependency.test.JUnit
@@ -186,7 +187,7 @@ fun ModuleDependency.excludeSpineBase() {
186187
fun Project.forceSpineBase() {
187188
configurations.all {
188189
resolutionStrategy {
189-
force(Spine.base)
190+
force(Base.lib)
190191
}
191192
}
192193
}
@@ -200,7 +201,7 @@ fun Project.forceBaseInProtoTasks() {
200201
configurations.configureEach {
201202
if (name.lowercased().contains("proto")) {
202203
resolutionStrategy {
203-
force(Spine.baseForBuildScript)
204+
force(Base.libForBuildScript)
204205
}
205206
}
206207
}

buildSrc/src/main/kotlin/fat-jar.gradle.kts

+20-2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2525
*/
2626

27+
import io.spine.dependency.local.Validation
2728
import io.spine.gradle.publish.SpinePublishing
2829

2930
plugins {
@@ -58,7 +59,7 @@ tasks.shadowJar {
5859
*
5960
* Locating this type in its own `io:spine:protodata` artifact is crucial
6061
* for obtaining proper version values from the manifest file.
61-
* This file is only present in `io:spine:protodata` artifact.
62+
* This file is only present in the `io:spine:protodata` artifact.
6263
*/
6364
"io/spine/protodata/gradle/plugin/Plugin.class",
6465
"META-INF/gradle-plugins/io.spine.protodata.properties",
@@ -96,7 +97,24 @@ tasks.shadowJar {
9697
"src/**",
9798

9899
// Java source code files of the package `org.osgi`.
99-
"OSGI-OPT/**"
100+
"OSGI-OPT/**",
101+
102+
// Kotlin runtime. It's going to be provided.
103+
"kotlin/**",
104+
"kotlinx/**",
105+
106+
// Kotlin module files for Kotlin Stdlib artifacts.
107+
"META-INF/kotlin-stdlib**",
108+
109+
// Annotations available via ProtoData classpath.
110+
"android/annotation/**",
111+
"javax/annotation/**",
112+
"org/intellij/**",
113+
"org/jetbrains/**",
114+
115+
// Exclude the descriptor set file which comes from `spine-validation-java-runtime`
116+
// used to build Validation itself.
117+
"io.spine.validation_java-runtime_main_${Validation.version}.desc",
100118
)
101119

102120
isZip64 = true /* The archive has way too many items. So using the Zip64 mode. */

buildSrc/src/main/kotlin/io/spine/dependency/build/ErrorProne.kt

+10-6
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,26 @@
2626

2727
package io.spine.dependency.build
2828

29+
2930
// https://errorprone.info/
3031
@Suppress("unused", "ConstPropertyName")
3132
object ErrorProne {
3233
// https://github.com/google/error-prone
3334
private const val version = "2.23.0"
35+
36+
const val group = "com.google.errorprone"
37+
3438
// https://github.com/tbroyer/gradle-errorprone-plugin/blob/v0.8/build.gradle.kts
3539
private const val javacPluginVersion = "9+181-r4173-1"
3640

3741
val annotations = listOf(
38-
"com.google.errorprone:error_prone_annotations:$version",
39-
"com.google.errorprone:error_prone_type_annotations:$version"
42+
"$group:error_prone_annotations:$version",
43+
"$group:error_prone_type_annotations:$version"
4044
)
41-
const val core = "com.google.errorprone:error_prone_core:$version"
42-
const val checkApi = "com.google.errorprone:error_prone_check_api:$version"
43-
const val testHelpers = "com.google.errorprone:error_prone_test_helpers:$version"
44-
const val javacPlugin = "com.google.errorprone:javac:$javacPluginVersion"
45+
const val core = "$group:error_prone_core:$version"
46+
const val checkApi = "$group:error_prone_check_api:$version"
47+
const val testHelpers = "$group:error_prone_test_helpers:$version"
48+
const val javacPlugin = "$group:javac:$javacPluginVersion"
4549

4650
// https://github.com/tbroyer/gradle-errorprone-plugin/releases
4751
object GradlePlugin {

buildSrc/src/main/kotlin/io/spine/dependency/lib/Asm.kt

+6-5
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,14 @@ package io.spine.dependency.lib
3030
@Suppress("unused", "ConstPropertyName")
3131
object Asm {
3232
private const val version = "9.6"
33-
const val lib = "org.ow2.asm:asm:$version"
33+
const val group = "org.ow2.asm"
34+
const val lib = "$group:asm:$version"
3435

3536
// We use the following artifacts only to force the versions
3637
// of the dependencies which are transitive for us.
3738
//
38-
const val tree = "org.ow2.asm:asm-tree:$version"
39-
const val analysis = "org.ow2.asm:asm-analysis:$version"
40-
const val util = "org.ow2.asm:asm-util:$version"
41-
const val commons = "org.ow2.asm:asm-commons:$version"
39+
const val tree = "$group:asm-tree:$version"
40+
const val analysis = "$group:asm-analysis:$version"
41+
const val util = "$group:asm-util:$version"
42+
const val commons = "$group:asm-commons:$version"
4243
}

buildSrc/src/main/kotlin/io/spine/dependency/lib/Grpc.kt

+13-12
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,21 @@ package io.spine.dependency.lib
3131
object Grpc {
3232
@Suppress("MemberVisibilityCanBePrivate")
3333
const val version = "1.59.0"
34-
const val api = "io.grpc:grpc-api:$version"
35-
const val auth = "io.grpc:grpc-auth:$version"
36-
const val core = "io.grpc:grpc-core:$version"
37-
const val context = "io.grpc:grpc-context:$version"
38-
const val inProcess = "io.grpc:grpc-inprocess:$version"
39-
const val stub = "io.grpc:grpc-stub:$version"
40-
const val okHttp = "io.grpc:grpc-okhttp:$version"
41-
const val protobuf = "io.grpc:grpc-protobuf:$version"
42-
const val protobufLite = "io.grpc:grpc-protobuf-lite:$version"
43-
const val netty = "io.grpc:grpc-netty:$version"
44-
const val nettyShaded = "io.grpc:grpc-netty-shaded:$version"
34+
const val group = "io.grpc"
35+
const val api = "$group:grpc-api:$version"
36+
const val auth = "$group:grpc-auth:$version"
37+
const val core = "$group:grpc-core:$version"
38+
const val context = "$group:grpc-context:$version"
39+
const val inProcess = "$group:grpc-inprocess:$version"
40+
const val stub = "$group:grpc-stub:$version"
41+
const val okHttp = "$group:grpc-okhttp:$version"
42+
const val protobuf = "$group:grpc-protobuf:$version"
43+
const val protobufLite = "$group:grpc-protobuf-lite:$version"
44+
const val netty = "$group:grpc-netty:$version"
45+
const val nettyShaded = "$group:grpc-netty-shaded:$version"
4546

4647
object ProtocPlugin {
4748
const val id = "grpc"
48-
const val artifact = "io.grpc:protoc-gen-grpc-java:$version"
49+
const val artifact = "$group:protoc-gen-grpc-java:$version"
4950
}
5051
}

buildSrc/src/main/kotlin/io/spine/dependency/lib/Guava.kt

+3-2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ package io.spine.dependency.lib
3838
@Suppress("unused", "ConstPropertyName")
3939
object Guava {
4040
private const val version = "32.1.3-jre"
41-
const val lib = "com.google.guava:guava:$version"
42-
const val testLib = "com.google.guava:guava-testlib:$version"
41+
const val group = "com.google.guava"
42+
const val lib = "$group:guava:$version"
43+
const val testLib = "$group:guava-testlib:$version"
4344
}

buildSrc/src/main/kotlin/io/spine/dependency/lib/JavaPoet.kt

+4-1
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,8 @@ package io.spine.dependency.lib
3030
@Suppress("unused", "ConstPropertyName")
3131
object JavaPoet {
3232
private const val version = "1.13.0"
33-
const val lib = "com.squareup:javapoet:$version"
33+
const val group = "com.squareup"
34+
const val artifact = "javapoet"
35+
const val module = "$group:$artifact"
36+
const val lib = "$module:$version"
3437
}

buildSrc/src/main/kotlin/io/spine/dependency/lib/JavaX.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ package io.spine.dependency.lib
3030
object JavaX {
3131
// This artifact, which used to be a part of J2EE, moved under the Eclipse EE4J project.
3232
// https://github.com/eclipse-ee4j/common-annotations-api
33-
const val annotations = "javax.annotation:javax.annotation-api:1.3.2"
33+
const val annotationGroup = "javax.annotation"
34+
const val annotations = "$annotationGroup:javax.annotation-api:1.3.2"
3435

3536
const val servletApi = "javax.servlet:javax.servlet-api:3.1.0"
3637
}

buildSrc/src/main/kotlin/io/spine/dependency/lib/Protobuf.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ package io.spine.dependency.lib
3232
"ConstPropertyName" /* https://bit.ly/kotlin-prop-names */
3333
)
3434
object Protobuf {
35-
private const val group = "com.google.protobuf"
35+
const val group = "com.google.protobuf"
3636
const val version = "3.25.1"
3737

3838
/**

buildSrc/src/main/kotlin/io/spine/dependency/lib/Roaster.kt

+3-2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ object Roaster {
3939
*/
4040
private const val version = "2.28.0.Final"
4141

42-
const val api = "org.jboss.forge.roaster:roaster-api:$version"
43-
const val jdt = "org.jboss.forge.roaster:roaster-jdt:$version"
42+
const val group = "org.jboss.forge.roaster"
43+
const val api = "$group:roaster-api:$version"
44+
const val jdt = "$group:roaster-jdt:$version"
4445
}

0 commit comments

Comments
 (0)