1717
1818buildscript {
1919 repositories {
20- jcenter()
20+ gradlePluginPortal()
21+ mavenCentral()
2122 }
2223 dependencies {
2324 classpath " gradle.plugin.cz.alenkacz:gradle-scalafmt:${ gradle.scalafmt.version} "
@@ -26,6 +27,7 @@ buildscript {
2627
2728plugins {
2829 id " org.scoverage" version " 7.0.0" apply false
30+ id " cz.alenkacz.gradle.scalafmt" version " 1.16.2" apply false
2931}
3032
3133subprojects {
@@ -41,16 +43,21 @@ subprojects {
4143 // ./gradlew :test:dependencies | grep -o 'akka-.*_' | cut -c 6- | rev | cut -c 2- | rev | sort -u
4244 def cons = project. getDependencies(). getConstraints()
4345 def akka = [' akka-actor' , ' akka-cluster' , ' akka-cluster-metrics' , ' akka-cluster-tools' , ' akka-coordination' ,
44- ' akka-discovery' , ' akka-distributed-data' , ' akka-protobuf' , ' akka-remote' , ' akka-slf4j' ,
45- ' akka-stream' , ' akka-stream-testkit' , ' akka-testkit' , ' akka-persistence' , ' akka-cluster-sharding' ]
46+ ' akka-discovery' , ' discovery-kubernetes-api' , ' discovery-marathon-api' , ' akka-distributed-data' ,' grpc-runtime' ,' akka-protobuf' , ' akka-remote' , ' akka-slf4j' ,
47+ ' akka-stream' , ' akka-stream-testkit' , ' akka-testkit' , ' akka-persistence' , ' akka-cluster-sharding' ,' akka-protobuf-v3' ,' akka-pki' ,' akka-parsing' ,' akka-management-cluster-bootstrap' ,' akka-management' ,
48+ ' akka-kryo-serialization' ]
4649 def akkaHttp = [' akka-http' , ' akka-http-core' , ' akka-http-spray-json' , ' akka-http-testkit' , ' akka-http-xml' ,
4750 ' akka-parsing' , ' akka-http2-support' ]
51+ def akkaKafka = [' akka-stream-kafka-testkit' ,' akka-stream-kafka' ,' akka-stream-alpakka-s3' ,' akka-stream-alpakka-file' ]
4852
4953 akka. forEach {
50- cons. add(' compile ' , " com.typesafe.akka:${ it} _${ gradle.scala.depVersion} :${ gradle.akka.version} " )
54+ cons. add(' implementation ' , " com.typesafe.akka:${ it} _${ gradle.scala.depVersion} :${ gradle.akka.version} " )
5155 }
5256 akkaHttp. forEach {
53- cons. add(' compile' , " com.typesafe.akka:${ it} _${ gradle.scala.depVersion} :${ gradle.akka_http.version} " )
57+ cons. add(' implementation' , " com.typesafe.akka:${ it} _${ gradle.scala.depVersion} :${ gradle.akka_http.version} " )
58+ }
59+ akkaKafka. forEach{
60+ cons. add(' implementation' , " com.typesafe.akka:${ it} _${ gradle.scala.depVersion} :${ gradle.akka_kafka.version} " )
5461 }
5562 }
5663
@@ -72,9 +79,17 @@ subprojects {
7279 }
7380 }
7481 }
82+
83+ configurations {
84+ implementationResolvable {
85+ canBeResolved = true
86+ canBeConsumed = false
87+ extendsFrom configurations. implementation
88+ }
89+ }
7590 }
7691
77- if (project. plugins. hasPlugin(' maven' )) {
92+ if (project. plugins. hasPlugin(' maven-publish ' )) {
7893 task sourcesJar(type : Jar , dependsOn : classes) {
7994 classifier = ' sources'
8095 from sourceSets. main. allSource
@@ -90,18 +105,12 @@ subprojects {
90105 classifier = ' tests'
91106 from sourceSets. test. output
92107 }
93-
94- artifacts {
95- archives sourcesJar
96- archives testSourcesJar
97- archives testClassesJar
98- }
99108 }
100109
101110 if (project. plugins. hasPlugin(' application' )) {
102111 // Ensure that dist archive name does not contain version
103112 distTar {
104- archiveName = " ${ project.name} .tar"
113+ archiveFileName = " ${ project.name} .tar"
105114 }
106115
107116 // Avoid generating the zip files from maven installations
0 commit comments