-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prototype migration of dependencies to a published Version Catalog #145
base: master
Are you sure you want to change the base?
Changes from 125 commits
f13912a
40de0cd
876e753
cdacc66
f73d91a
6223f80
7bff623
82fd9e8
3e2cf05
e8658f8
e580c66
14227a0
ac3713d
e60dc17
90769f9
a9dbff9
52f19ee
213fbbf
5339b08
54c8691
1636d63
8d7a569
b062f39
b6b9b97
63fafc9
3e9190e
671127c
2e973ff
e7f5e2f
1013f62
bd2f73c
552978f
65d1821
1fe8751
ef8926c
f739530
950938f
f2b756d
c1720e0
1719780
d9c80db
1c36844
d8ccfac
c1d8f8f
4863e86
644db5a
ff03310
d9dc357
51ba241
8c7c47a
1924ca8
32a245c
ef9efca
c2c5905
6811b88
a0166ef
9388a86
afe95c0
cf9a21e
c2f38b5
ab351d7
1c4ca3c
0f4cf6a
42ebd2e
bd1e135
1cdd8f2
3965f0d
7c6bf60
ba8794d
c99d849
41be4cd
088fd37
a4b0215
5d91bdd
b17746d
5e665f8
d895b8a
6dcd2a9
bdd6d84
902fa0c
95d7311
3df319d
19fe096
2c04ab9
85049ad
f5aaf83
c98cea7
debddef
448540b
91cd22f
e5c808c
60dad3b
a7a7a96
4416249
a286993
18a8da5
6a0254b
5dc562f
110fa19
e5bf358
1c249a7
1251230
b42b7ac
19bec92
227957e
e0f9b8f
ec2a58a
81fee2f
9ec6ddb
a646794
9c52bd9
53eb9d7
0839e2a
8222c96
06371b6
69e2dc4
4742e03
658316a
5dc5b7d
2fe43c6
00a9322
1820e04
8586583
8aa258a
7d3d397
94235bd
9486741
6c074b1
58c9884
afa5519
3ca8a35
c9601de
4619471
5b1698d
54c1d3f
66608d5
e2c6cbc
e21c29b
7786049
391abf9
77c8585
17aaf48
35eb30f
b9e00ae
f5199ae
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,19 +24,11 @@ | |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
/** | ||
* This script uses two declarations of the constant [licenseReportVersion] because | ||
* currently there is no way to define a constant _before_ a build script of `buildSrc`. | ||
* We cannot use imports or do something else before the `buildscript` or `plugin` clauses. | ||
*/ | ||
|
||
plugins { | ||
java | ||
groovy | ||
`kotlin-dsl` | ||
pmd | ||
val licenseReportVersion = "2.1" | ||
id("com.github.jk1.dependency-license-report").version(licenseReportVersion) | ||
} | ||
|
||
repositories { | ||
|
@@ -45,105 +37,70 @@ repositories { | |
mavenCentral() | ||
} | ||
|
||
/** | ||
* The version of Jackson used by `buildSrc`. | ||
* | ||
* Please keep this value in sync. with `io.spine.internal.dependency.Jackson.version`. | ||
* It's not a requirement, but would be good in terms of consistency. | ||
*/ | ||
val jacksonVersion = "2.13.0" | ||
|
||
val googleAuthToolVersion = "2.1.2" | ||
val licenseReportVersion = "2.1" | ||
val grGitVersion = "3.1.1" | ||
|
||
/** | ||
* The version of the Kotlin Gradle plugin. | ||
* | ||
* Please check that this value matches one defined in | ||
* [io.spine.internal.dependency.Kotlin.version]. | ||
*/ | ||
val kotlinVersion = "1.6.21" | ||
|
||
/** | ||
* The version of Guava used in `buildSrc`. | ||
* | ||
* Always use the same version as the one specified in [io.spine.internal.dependency.Guava]. | ||
* Otherwise, when testing Gradle plugins, clashes may occur. | ||
*/ | ||
val guavaVersion = "31.1-jre" | ||
|
||
/** | ||
* The version of ErrorProne Gradle plugin. | ||
* | ||
* Please keep in sync. with [io.spine.internal.dependency.ErrorProne.GradlePlugin.version]. | ||
* | ||
* @see <a href="https://github.com/tbroyer/gradle-errorprone-plugin/releases"> | ||
* Error Prone Gradle Plugin Releases</a> | ||
*/ | ||
val errorProneVersion = "2.0.2" | ||
|
||
/** | ||
* The version of Protobuf Gradle Plugin. | ||
* | ||
* Please keep in sync. with [io.spine.internal.dependency.Protobuf.GradlePlugin.version]. | ||
* | ||
* @see <a href="https://github.com/google/protobuf-gradle-plugin/releases"> | ||
* Protobuf Gradle Plugins Releases</a> | ||
*/ | ||
val protobufPluginVersion = "0.8.18" | ||
|
||
/** | ||
* The version of Dokka Gradle Plugins. | ||
* | ||
* Please keep in sync with [io.spine.internal.dependency.Dokka.version]. | ||
* | ||
* @see <a href="https://github.com/Kotlin/dokka/releases"> | ||
* Dokka Releases</a> | ||
*/ | ||
val dokkaVersion = "1.6.20" | ||
// Let's get rid of warnings about different Kotlin version on the classpath. | ||
// Also, builds are more reproducible when dynamic version resolution is suppressed. | ||
|
||
configurations.all { | ||
resolutionStrategy { | ||
// Force Kotlin lib versions avoiding using those bundled with Gradle. | ||
failOnVersionConflict() | ||
force( | ||
"org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion", | ||
"org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion", | ||
"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion", | ||
"org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion", | ||
"org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion" | ||
libs.apacheHttp.core, | ||
libs.guava, | ||
libs.httpClient.google, | ||
libs.jackson.core, | ||
libs.jackson.databind, | ||
libs.jackson.dataformatXml, | ||
libs.jackson.moduleKotlin, | ||
libs.kotlin.reflect, | ||
libs.kotlin.stdLib, | ||
libs.kotlin.stdLib.common, | ||
libs.kotlin.stdLib.jdk8, | ||
libs.kotlinX.coroutines.core, | ||
libs.kotlinX.coroutines.core.jvm, | ||
libs.slf4J.api, | ||
) | ||
} | ||
} | ||
|
||
val jvmVersion = JavaLanguageVersion.of(11) | ||
|
||
java { | ||
toolchain.languageVersion.set(jvmVersion) | ||
} | ||
|
||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> { | ||
kotlinOptions { | ||
jvmTarget = jvmVersion.toString() | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion") | ||
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jacksonVersion") | ||
implementation("com.google.cloud.artifactregistry:artifactregistry-auth-common:$googleAuthToolVersion") { | ||
exclude(group = "com.google.guava") | ||
} | ||
implementation("com.google.guava:guava:$guavaVersion") | ||
api("com.github.jk1:gradle-license-report:$licenseReportVersion") | ||
implementation("org.ajoberstar.grgit:grgit-core:${grGitVersion}") | ||
implementation("net.ltgt.gradle:gradle-errorprone-plugin:${errorProneVersion}") | ||
|
||
// Add explicit dependency to avoid warning on different Kotlin runtime versions. | ||
implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion") | ||
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion") | ||
|
||
implementation("gradle.plugin.com.google.protobuf:protobuf-gradle-plugin:$protobufPluginVersion") | ||
implementation("org.jetbrains.dokka:dokka-gradle-plugin:${dokkaVersion}") | ||
implementation("org.jetbrains.dokka:dokka-base:${dokkaVersion}") | ||
/* | ||
We add the implementation dependency on the class of `libs` extension | ||
in order to make the generated `LibrariesForLibs` available in `main` | ||
source set. | ||
|
||
It does not mean our dependencies will be available in `main` sources. | ||
It means we can fetch them in a type-safe manner from a `Project` instance, | ||
in which this extension is registered. | ||
|
||
For example: | ||
val libs = project.extensions.getByType<LibrariesForLibs>() | ||
*/ | ||
|
||
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location)) | ||
|
||
implementation(libs.errorProne.gradlePlugin) | ||
implementation(libs.googleCloud.artifactRegistry.authCommon) | ||
implementation(libs.grGit.core) | ||
implementation(libs.guava) | ||
implementation(libs.jackson.databind) | ||
implementation(libs.jackson.dataformatXml) | ||
implementation(libs.kotlin.gradlePlugin) | ||
implementation(libs.licenseReport.gradlePlugin) | ||
implementation(libs.protobuf.gradlePlugin) | ||
|
||
/* | ||
These guys below use a fat jar with Kotlin runtime inside. One more | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's be more polite and format here. They aren't "these guys". |
||
Kotlin version. This is a reason for two warnings. | ||
|
||
I'm not sure if we can just exclude those jars. It should be checked on | ||
a repo where Dokka is used. And if not, leave a comment here, describing | ||
why it is so. | ||
*/ | ||
|
||
implementation(libs.dokka.gradlePlugin) | ||
implementation(libs.dokka.basePlugin) { | ||
exclude("org.jetbrains.dokka", "kotlin-analysis-compiler") | ||
exclude("org.jetbrains.dokka", "kotlin-analysis-intellij") | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reading it again, I am thinking now, to which piece of code this comment relates? Perhaps, it is misplaced?