Closed jmfayard closed 3 years ago
I'm not sure we need to add Guice, nor Kotlin unfriendly Gson (lying nullability).
those non-kotliny things would fit well enough into buildSr
c for people who do end up using them a lot (or a includeBuild/plugin)
RxJava is also missing
Also for backend people we already have ktor and we should add the dependencies for the Spring framework that are displayed on https://start.spring.io/
Using the web interface, I added all available dependencies which generated the following Gradle file
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("org.springframework.boot") version "2.3.3.RELEASE"
id("io.spring.dependency-management") version "1.0.10.RELEASE"
id("org.asciidoctor.convert") version "1.5.8"
kotlin("jvm") version "1.3.72"
kotlin("plugin.spring") version "1.3.72"
kotlin("plugin.jpa") version "1.3.72"
}
group = "com.example"
version = "0.0.1-SNAPSHOT"
java.sourceCompatibility = JavaVersion.VERSION_11
configurations {
compileOnly {
extendsFrom(configurations.annotationProcessor.get())
}
}
repositories {
mavenCentral()
}
extra["snippetsDir"] = file("build/generated-snippets")
extra["azureVersion"] = "2.3.3"
extra["solaceSpringCloudVersion"] = "1.1.1"
extra["springBootAdminVersion"] = "2.3.0"
extra["springCloudVersion"] = "Hoxton.SR8"
extra["testcontainersVersion"] = "1.14.3"
extra["vaadinVersion"] = "14.3.4"
extra["wavefrontVersion"] = "2.0.0"
dependencies {
implementation("org.springframework.boot:spring-boot-starter-activemq")
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-amqp")
implementation("org.springframework.boot:spring-boot-starter-artemis")
implementation("org.springframework.boot:spring-boot-starter-batch")
implementation("org.springframework.boot:spring-boot-starter-cache")
implementation("org.springframework.boot:spring-boot-starter-data-cassandra")
implementation("org.springframework.boot:spring-boot-starter-data-cassandra-reactive")
implementation("org.springframework.boot:spring-boot-starter-data-couchbase")
implementation("org.springframework.boot:spring-boot-starter-data-couchbase-reactive")
implementation("org.springframework.boot:spring-boot-starter-data-elasticsearch")
implementation("org.springframework.boot:spring-boot-starter-data-jdbc")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-data-ldap")
implementation("org.springframework.boot:spring-boot-starter-data-mongodb")
implementation("org.springframework.boot:spring-boot-starter-data-mongodb-reactive")
implementation("org.springframework.boot:spring-boot-starter-data-neo4j")
implementation("org.springframework.boot:spring-boot-starter-data-r2dbc")
implementation("org.springframework.boot:spring-boot-starter-data-redis")
implementation("org.springframework.boot:spring-boot-starter-data-redis-reactive")
implementation("org.springframework.boot:spring-boot-starter-data-rest")
implementation("org.springframework.boot:spring-boot-starter-data-solr")
implementation("org.springframework.boot:spring-boot-starter-freemarker")
implementation("org.springframework.boot:spring-boot-starter-groovy-templates")
implementation("org.springframework.boot:spring-boot-starter-hateoas")
implementation("org.springframework.boot:spring-boot-starter-integration")
implementation("org.springframework.boot:spring-boot-starter-jdbc")
implementation("org.springframework.boot:spring-boot-starter-jersey")
implementation("org.springframework.boot:spring-boot-starter-jooq")
implementation("org.springframework.boot:spring-boot-starter-mail")
implementation("org.springframework.boot:spring-boot-starter-mustache")
implementation("org.springframework.boot:spring-boot-starter-oauth2-client")
implementation("org.springframework.boot:spring-boot-starter-oauth2-resource-server")
implementation("org.springframework.boot:spring-boot-starter-quartz")
implementation("org.springframework.boot:spring-boot-starter-rsocket")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.boot:spring-boot-starter-thymeleaf")
implementation("org.springframework.boot:spring-boot-starter-validation")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-web-services")
implementation("org.springframework.boot:spring-boot-starter-webflux")
implementation("org.springframework.boot:spring-boot-starter-websocket")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("com.microsoft.azure:azure-active-directory-spring-boot-starter")
implementation("com.microsoft.azure:azure-keyvault-secrets-spring-boot-starter")
implementation("com.microsoft.azure:azure-spring-boot-starter")
implementation("com.okta.spring:okta-spring-boot-starter:1.4.0")
implementation("com.solace.spring.cloud:spring-cloud-starter-stream-solace")
implementation("com.vaadin:vaadin-spring-boot-starter")
implementation("com.wavefront:wavefront-spring-boot-starter")
implementation("de.codecentric:spring-boot-admin-starter-client")
implementation("de.codecentric:spring-boot-admin-starter-server")
implementation("io.projectreactor.kotlin:reactor-kotlin-extensions")
implementation("org.apache.camel.springboot:camel-spring-boot-starter:3.4.3")
implementation("org.apache.kafka:kafka-streams")
implementation("org.flywaydb:flyway-core")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor")
implementation("org.liquibase:liquibase-core")
implementation("org.mybatis.spring.boot:mybatis-spring-boot-starter:2.1.3")
implementation("org.springframework.cloud:spring-cloud-bus")
implementation("org.springframework.cloud:spring-cloud-cloudfoundry-discovery")
implementation("org.springframework.cloud:spring-cloud-config-server")
implementation("org.springframework.cloud:spring-cloud-function-web")
implementation("org.springframework.cloud:spring-cloud-gcp-starter")
implementation("org.springframework.cloud:spring-cloud-gcp-starter-pubsub")
implementation("org.springframework.cloud:spring-cloud-gcp-starter-storage")
implementation("org.springframework.cloud:spring-cloud-starter")
implementation("org.springframework.cloud:spring-cloud-starter-aws")
implementation("org.springframework.cloud:spring-cloud-starter-aws-jdbc")
implementation("org.springframework.cloud:spring-cloud-starter-aws-messaging")
implementation("org.springframework.cloud:spring-cloud-starter-circuitbreaker-reactor-resilience4j")
implementation("org.springframework.cloud:spring-cloud-starter-config")
implementation("org.springframework.cloud:spring-cloud-starter-consul-config")
implementation("org.springframework.cloud:spring-cloud-starter-consul-discovery")
implementation("org.springframework.cloud:spring-cloud-starter-gateway")
implementation("org.springframework.cloud:spring-cloud-starter-loadbalancer")
implementation("org.springframework.cloud:spring-cloud-starter-netflix-eureka-client")
implementation("org.springframework.cloud:spring-cloud-starter-netflix-eureka-server")
implementation("org.springframework.cloud:spring-cloud-starter-netflix-hystrix")
implementation("org.springframework.cloud:spring-cloud-starter-netflix-hystrix-dashboard")
implementation("org.springframework.cloud:spring-cloud-starter-netflix-ribbon")
implementation("org.springframework.cloud:spring-cloud-starter-netflix-turbine")
implementation("org.springframework.cloud:spring-cloud-starter-netflix-turbine-stream")
implementation("org.springframework.cloud:spring-cloud-starter-netflix-zuul")
implementation("org.springframework.cloud:spring-cloud-starter-oauth2")
implementation("org.springframework.cloud:spring-cloud-starter-open-service-broker:3.1.1.RELEASE")
implementation("org.springframework.cloud:spring-cloud-starter-openfeign")
implementation("org.springframework.cloud:spring-cloud-starter-security")
implementation("org.springframework.cloud:spring-cloud-starter-sleuth")
implementation("org.springframework.cloud:spring-cloud-starter-task")
implementation("org.springframework.cloud:spring-cloud-starter-vault-config")
implementation("org.springframework.cloud:spring-cloud-starter-zipkin")
implementation("org.springframework.cloud:spring-cloud-starter-zookeeper-config")
implementation("org.springframework.cloud:spring-cloud-starter-zookeeper-discovery")
implementation("org.springframework.cloud:spring-cloud-stream")
implementation("org.springframework.cloud:spring-cloud-stream-binder-kafka")
implementation("org.springframework.cloud:spring-cloud-stream-binder-kafka-streams")
implementation("org.springframework.cloud:spring-cloud-stream-binder-rabbit")
implementation("org.springframework.data:spring-data-rest-hal-explorer")
implementation("org.springframework.geode:spring-geode-starter:1.3.3.RELEASE")
implementation("org.springframework.kafka:spring-kafka")
implementation("org.springframework.security:spring-security-messaging")
implementation("org.springframework.security:spring-security-rsocket")
implementation("org.springframework.session:spring-session-data-redis")
implementation("org.springframework.session:spring-session-jdbc")
compileOnly("org.projectlombok:lombok")
developmentOnly("org.springframework.boot:spring-boot-devtools")
runtimeOnly("com.h2database:h2")
runtimeOnly("com.ibm.db2:jcc")
runtimeOnly("com.microsoft.sqlserver:mssql-jdbc")
runtimeOnly("com.oracle.database.jdbc:ojdbc8")
runtimeOnly("dev.miku:r2dbc-mysql")
runtimeOnly("io.micrometer:micrometer-registry-datadog")
runtimeOnly("io.micrometer:micrometer-registry-graphite")
runtimeOnly("io.micrometer:micrometer-registry-influx")
runtimeOnly("io.micrometer:micrometer-registry-new-relic")
runtimeOnly("io.micrometer:micrometer-registry-prometheus")
runtimeOnly("io.r2dbc:r2dbc-h2")
runtimeOnly("io.r2dbc:r2dbc-mssql")
runtimeOnly("io.r2dbc:r2dbc-postgresql")
runtimeOnly("mysql:mysql-connector-java")
runtimeOnly("org.apache.derby:derby")
runtimeOnly("org.hsqldb:hsqldb")
runtimeOnly("org.postgresql:postgresql")
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
annotationProcessor("org.projectlombok:lombok")
testImplementation("org.springframework.boot:spring-boot-starter-test") {
exclude(group = "org.junit.vintage", module = "junit-vintage-engine")
}
testImplementation("com.unboundid:unboundid-ldapsdk")
testImplementation("de.flapdoodle.embed:de.flapdoodle.embed.mongo")
testImplementation("io.projectreactor:reactor-test")
testImplementation("org.springframework.amqp:spring-rabbit-test")
testImplementation("org.springframework.batch:spring-batch-test")
testImplementation("org.springframework.cloud:spring-cloud-starter-contract-stub-runner")
testImplementation("org.springframework.cloud:spring-cloud-starter-contract-verifier")
testImplementation("org.springframework.cloud:spring-cloud-stream-test-support")
testImplementation("org.springframework.integration:spring-integration-test")
testImplementation("org.springframework.kafka:spring-kafka-test")
testImplementation("org.springframework.restdocs:spring-restdocs-mockmvc")
testImplementation("org.springframework.security:spring-security-test")
testImplementation("org.testcontainers:cassandra")
testImplementation("org.testcontainers:couchbase")
testImplementation("org.testcontainers:db2")
testImplementation("org.testcontainers:elasticsearch")
testImplementation("org.testcontainers:junit-jupiter")
testImplementation("org.testcontainers:kafka")
testImplementation("org.testcontainers:mongodb")
testImplementation("org.testcontainers:mssqlserver")
testImplementation("org.testcontainers:mysql")
testImplementation("org.testcontainers:neo4j")
testImplementation("org.testcontainers:oracle-xe")
testImplementation("org.testcontainers:postgresql")
testImplementation("org.testcontainers:r2dbc")
testImplementation("org.testcontainers:rabbitmq")
testImplementation("org.testcontainers:solr")
}
dependencyManagement {
imports {
mavenBom("com.solace.spring.cloud:solace-spring-cloud-bom:${property("solaceSpringCloudVersion")}")
mavenBom("com.vaadin:vaadin-bom:${property("vaadinVersion")}")
mavenBom("de.codecentric:spring-boot-admin-dependencies:${property("springBootAdminVersion")}")
mavenBom("com.wavefront:wavefront-spring-boot-bom:${property("wavefrontVersion")}")
mavenBom("org.testcontainers:testcontainers-bom:${property("testcontainersVersion")}")
mavenBom("com.microsoft.azure:azure-spring-boot-bom:${property("azureVersion")}")
mavenBom("org.springframework.cloud:spring-cloud-dependencies:${property("springCloudVersion")}")
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "11"
}
}
tasks.test {
outputs.dir(snippetsDir)
}
tasks.asciidoctor {
inputs.dir(snippetsDir)
dependsOn(test)
}
And if someone is courageous enough, those are the other kotlin solutions on the backend
@jmfayard @LouisCAD I believe it could be better to split the definitions in multiple sub-packages. Having few shipped with refreshVersions, and having additional packages for shortcuts. I'm doing so with this small project.
Ideally, you could have them splitted, and also offer a meta package for importing them all. This also could help in case of conflicts.
I asked ~ktor~ http4k to give a list of their 40 modules here https://github.com/http4k/http4k/issues/484
@DanySK we can always split the definitions later, but I'm not super worried for that now.
refreshVersions.jar
is currently 175KB, which compared to the 110MB of gradle.jar is peanuts
It's also peanuts compared to the size of the webpages one would browse to find if there's any update.
@jmfayard I believe it'd be more to reduce the probability of conflicts than an issue with size - which I frankly did not even think of as an issue.
Which kind of conflicts? And what can we do to prevent them?
Multiple libraries with the same name, for instance, of which one has an overridden name, and the other does not. This could cause confusion, and is something that I've seen happening especially in closed projects, along with custom repackages of libraries.
Say that some random company creates a patched version of Kotest (or another library for which there is a very reasonable key rule) and calls it "my.company:kotest-*". What if they want to have version.kotest custom rule pointing at their own package? Can they not load or unload or override the default setting?
I realize they are corner cases, but if supporting the possibility of selectively load/reject aliases or shadow them is cheap, I'd support it.
@DanySK
What if they want to have version.kotest custom rule pointing at their own package? Can they not load or unload or override the default setting?
If they don't use any kotest official artifacts in their dependencies having the version placeholder (or constants from refreshVersions), they can have a more specific rule for their maven coordinates with the same alias, though I'd always recommend to have the company name in the version key to avoid any confusion.
If that's not enough, then let them convince us to make an "enterprise" version of refreshVersions 😄
I am not sure if this is a good place to drop the libraries I found missing, so please let me know if you would prefer another ticket
Android:
Google APIs:
Firebase:
ReactiveX:
Misc:
From the Kotlin Libraries Playground:
https://github.com/LouisCAD/kotlin-libraries-playground
implementation ("com.github.ajalt:mordant:_")
implementation("com.beust:klaxon:_")
implementation("com.github.ajalt.clikt:clikt:_")
implementation("com.github.ajalt.clikt:clikt:_")
implementation("com.h2database:h2:_")
implementation("com.h2database:h2:_")
implementation("com.sksamuel.hoplite:hoplite-core:_")
implementation("com.sksamuel.hoplite:hoplite-hocon:_")
implementation("com.sksamuel.hoplite:hoplite-yaml:_")
implementation("com.squareup.sqldelight:sqlite-driver:_")
implementation("com.squareup.sqldelight:sqlite-driver:_")
implementation("com.tinder.statemachine:statemachine:_")
implementation("com.uchuhimo:konf:_")
implementation("io.github.serpro69:kotlin-faker:_")
implementation("it.skrape:skrapeit-core:_")
implementation("org.jetbrains.exposed:exposed-core:_")
implementation("org.jetbrains.exposed:exposed-core:_")
implementation("org.jetbrains.exposed:exposed-dao:_")
implementation("org.jetbrains.exposed:exposed-dao:_")
implementation("org.jetbrains.exposed:exposed-java-time:_")
implementation("org.jetbrains.exposed:exposed-java-time:_")
implementation("org.jetbrains.exposed:exposed-jdbc:_")
implementation("org.jetbrains.exposed:exposed-jdbc:_")
implementation("org.jetbrains.kotlin:kotlin-reflect:_")
implementation("org.jetbrains.kotlinx:kotlinx-datetime:_")
implementation("org.kodein.di:kodein-di:_")
implementation("org.koin:koin-core:_")
We need to make it a little easier, and documented to add dependencies constants with the proper rules. This is one of the priorities for 1.0
Add GraphQL https://github.com/jmfayard/refreshVersions/pull/258/files
import org.gradle.api.Incubating
@Incubating
object ApolloGraphQL {
/**
* A strongly-typed, caching GraphQL client for the JVM, Android and Kotlin multiplatform.
*
* GitHub page: [apollographql/apollo-android](https://github.com/apollographql/apollo-android)
*/
const val apolloGradlePlugin = "com.apollographql.apollo:apollo-gradle-plugin:_"
const val apolloApi = "com.apollographql.apollo:apollo-api:_"
const val apolloRuntime = "com.apollographql.apollo:apollo-runtime:_"
const val apolloHttpCache = "com.apollographql.apollo:apollo-http-cache:_"
const val apolloNormalizedCache = "com.apollographql.apollo:apollo-normalized-cache:_"
const val apolloNormalizedCacheSqlite = "com.apollographql.apollo:apollo-normalized-cache-sqlite:_"
const val apolloCoroutinesSupport = "com.apollographql.apollo:apollo-coroutines-support:_"
const val apolloRx2Support = "com.apollographql.apollo:apollo-rx2-support:_"
const val apolloRx3Support = "com.apollographql.apollo:apollo-rx3-support:_"
const val apolloRuntimeKotlin = "com.apollographql.apollo:apollo-runtime-kotlin:_"
const val apolloIdlingResource = "com.apollographql.apollo:apollo-idling-resource:_"
const val apolloCompiler = "com.apollographql.apollo:apollo-compiler:_"
}
Add ksp: https://github.com/google/ksp
In the kotlin project, ksp will be better than kapt, so I highly recommend adding this dependency
The various libraries by Mike Penz would be very useful (at least for me): https://github.com/mikepenz/AboutLibraries https://github.com/mikepenz/MaterialDrawer https://github.com/mikepenz/FastAdapter
This one is awesome, and has lots of additional items:
the followings are also missing
wish to have these available as well
I would like to propose the great Arrow libs
Note that they also have a BOM available
More missing libs:
coil-compose
@jmfayard Shall we close this issue, now that we have issue templates for new dependency notations, and contributing docs to submit a dependency notations PR?
Yes
Alright.
Please everyone that suggested dependency notations that are still not into refreshVersions, create one issue per group of dependencies, or if you want, directly submit PRs from the ones that are part of groups already present in refreshVersions.
Submitting issues with the template is now the way.
Thank you all :)
Want to contribute new libraries?
Propose it here.
We have homework on our side, we wants to make it easier to contribute a new group:
Proposal for simplifying adding a dependency group https://github.com/jmfayard/refreshVersions/pull/262