Skip to content

Bump librarian and move all plugins to build-logic #90

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

Merged
merged 4 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ group = "com.apollographql.cache.build"

dependencies {
compileOnly(gradleApi())
compileOnly(libs.kotlin.plugin)
implementation(libs.kotlin.plugin)
implementation(libs.librarian)
implementation(libs.atomicfu.plugin)
implementation(libs.sqldelight.plugin)
implementation(libs.android.plugin)
}

java {
Expand Down
13 changes: 3 additions & 10 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
import com.gradleup.librarian.gradle.librarianRoot
import com.gradleup.librarian.gradle.Librarian

plugins {
id("build.logic") apply false

alias(libs.plugins.kotlin.multiplatform).apply(false)
alias(libs.plugins.kotlin.jvm).apply(false)
alias(libs.plugins.android).apply(false)
alias(libs.plugins.librarian).apply(false)
alias(libs.plugins.atomicfu).apply(false)
alias(libs.plugins.sqldelight).apply(false)
id("build.logic").apply(false)
}

librarianRoot()
Librarian.root(project)
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
org.gradle.jvmargs=-Xmx8g

android.useAndroidX=true

kotlin.stdlib.default.dependency=false
19 changes: 10 additions & 9 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
[versions]
kotlin-plugin = "2.0.21"
kotlin-plugin = "2.1.0"
android-plugin = "8.7.0"
apollo = "4.1.0"
apollo = "4.1.1"
okio = "3.9.0"
atomicfu = "0.23.1" # Must be the same version as the one used by apollo-testing-support or native compilation will fail
sqldelight = "2.0.1"
androidx-sqlite = "2.3.1"
librarian = "0.0.6"
librarian = "0.0.8-SNAPSHOT-cd822254de75426f8f047a50bae467da872cc912"

[libraries]
apollo-api = { group = "com.apollographql.apollo", name = "apollo-api", version.ref = "apollo" }
apollo-mpp-utils = { group = "com.apollographql.apollo", name = "apollo-mpp-utils", version.ref = "apollo" }
apollo-testing-support = { group = "com.apollographql.apollo", name = "apollo-testing-support", version.ref = "apollo" }
apollo-runtime = { group = "com.apollographql.apollo", name = "apollo-runtime", version.ref = "apollo" }
apollo-mockserver = "com.apollographql.mockserver:apollo-mockserver:0.0.1"
apollo-mockserver = "com.apollographql.mockserver:apollo-mockserver:0.1.0"
apollo-ast = { group = "com.apollographql.apollo", name = "apollo-ast", version.ref = "apollo" }
apollo-compiler = { group = "com.apollographql.apollo", name = "apollo-compiler", version.ref = "apollo" }
apollo-cache = { group = "com.apollographql.apollo", name = "apollo-normalized-cache", version.ref = "apollo" }
apollo-cache-sqlite = { group = "com.apollographql.apollo", name = "apollo-normalized-cache-sqlite", version.ref = "apollo" }
apollo-plugin = { group = "com.apollographql.apollo", name = "apollo-gradle-plugin", version.ref = "apollo" }
atomicfu-library = { group = "org.jetbrains.kotlinx", name = "atomicfu", version.ref = "atomicfu" }
atomicfu-plugin = { group = "org.jetbrains.kotlinx", name = "atomicfu-gradle-plugin", version.ref = "atomicfu" }
kotlin-test = { group = "org.jetbrains.kotlin", name = "kotlin-test" } # the Kotlin plugin resolves the version
kotlin-test-junit = { group = "org.jetbrains.kotlin", name = "kotlin-test-junit" } # the Kotlin plugin resolves the version
okio = { group = "com.squareup.okio", name = "okio", version.ref = "okio" }
Expand All @@ -35,12 +37,11 @@ androidx-sqlite-framework = { group = "androidx.sqlite", name = "sqlite-framewor
androidx-startup-runtime = "androidx.startup:startup-runtime:1.1.1"
kotlin-poet = { group = "com.squareup", name = "kotlinpoet", version = "1.18.1" }
kotlin-plugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin-plugin" }
librarian = { module = "com.gradleup.librarian:librarian-gradle-plugin", version.ref = "librarian"}
android-plugin = { module = "com.android.tools.build:gradle", version.ref = "android-plugin"}
sqldelight-plugin = { module = "app.cash.sqldelight:gradle-plugin", version.ref = "sqldelight"}


[plugins]
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin-plugin" }
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin-plugin" }
android = { id = "com.android.library", version.ref = "android-plugin" }
librarian = { id = "com.gradleup.librarian", version.ref = "librarian" }
atomicfu = { id = "org.jetbrains.kotlin.plugin.atomicfu", version.ref = "kotlin-plugin" }
sqldelight = { id = "app.cash.sqldelight", version.ref = "sqldelight" }
apollo = { id = "com.apollographql.apollo", version.ref = "apollo" }
1 change: 1 addition & 0 deletions gradle/repositories.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ listOf(pluginManagement.repositories, dependencyResolutionManagement.repositorie
mavenCentral()
google()
gradlePluginPortal()
maven("https://storage.googleapis.com/gradleup/m2")
}
}
22 changes: 18 additions & 4 deletions kotlin-js-store/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,13 @@ js-yaml@^4.1.0:
dependencies:
argparse "^2.0.1"

kotlin-web-helpers@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/kotlin-web-helpers/-/kotlin-web-helpers-2.0.0.tgz#b112096b273c1e733e0b86560998235c09a19286"
integrity sha512-xkVGl60Ygn/zuLkDPx+oHj7jeLR7hCvoNF99nhwXMn8a3ApB4lLiC9pk4ol4NHPjyoCbvQctBqvzUcp8pkqyWw==
dependencies:
format-util "^1.0.5"

locate-path@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286"
Expand All @@ -308,10 +315,10 @@ minimatch@^5.0.1, minimatch@^5.1.6:
dependencies:
brace-expansion "^2.0.1"

mocha@10.7.0:
version "10.7.0"
resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.7.0.tgz#9e5cbed8fa9b37537a25bd1f7fb4f6fc45458b9a"
integrity sha512-v8/rBWr2VO5YkspYINnvu81inSz2y3ODJrhO175/Exzor1RcEZZkizgE2A+w/CAXXoESS8Kys5E62dOHGHzULA==
mocha@10.7.3:
version "10.7.3"
resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.7.3.tgz#ae32003cabbd52b59aece17846056a68eb4b0752"
integrity sha512-uQWxAu44wwiACGqjbPYmjo7Lg8sFrS3dQe7PP2FQI+woptP4vZXSMcfMyFL/e1yFEeEpV4RtyTpZROOKmxis+A==
dependencies:
ansi-colors "^4.1.3"
browser-stdout "^1.3.1"
Expand Down Expand Up @@ -346,6 +353,13 @@ node-fetch@2.6.7:
dependencies:
whatwg-url "^5.0.0"

node-fetch@2.7.0:
version "2.7.0"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d"
integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==
dependencies:
whatwg-url "^5.0.0"

normalize-path@^3.0.0, normalize-path@~3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
Expand Down
1 change: 0 additions & 1 deletion librarian.properties → librarian.root.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ pom.description=Apollo Kotlin Incubating Normalized Cache
pom.vcsUrl=https://github.com/apollographql/apollo-kotlin-normalized-cache-incubating
pom.developer=Apollo Kotlin Incubating Normalized Cache contributors
pom.license=MIT License
pom.licenseUrl=https://raw.githubusercontent.com/apollographql/apollo-kotlin-normalized-cache-incubating/main/LICENSE
6 changes: 3 additions & 3 deletions normalized-cache-apollo-compiler-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import com.gradleup.librarian.gradle.librarianModule
import com.gradleup.librarian.gradle.Librarian

plugins {
alias(libs.plugins.kotlin.jvm)
id("org.jetbrains.kotlin.jvm")
}

librarianModule(true)
Librarian.module(project)

dependencies {
implementation(libs.apollo.compiler)
Expand Down
8 changes: 4 additions & 4 deletions normalized-cache-incubating/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import com.gradleup.librarian.gradle.librarianModule
import com.gradleup.librarian.gradle.Librarian

plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.atomicfu)
id("org.jetbrains.kotlin.multiplatform")
id("org.jetbrains.kotlin.plugin.atomicfu")
}

librarianModule(true)
Librarian.module(project)

kotlin {
configureKmp(
Expand Down
10 changes: 5 additions & 5 deletions normalized-cache-sqlite-incubating/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import com.gradleup.librarian.gradle.librarianModule
import com.gradleup.librarian.gradle.Librarian

plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.android)
alias(libs.plugins.sqldelight)
id("org.jetbrains.kotlin.multiplatform")
id("com.android.library")
id("app.cash.sqldelight")
}

librarianModule(true)
Librarian.module(project)

kotlin {
configureKmp(
Expand Down
3 changes: 1 addition & 2 deletions tests/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
plugins {
id("build.logic") apply false

id("build.logic").apply(false)
alias(libs.plugins.kotlin.multiplatform).apply(false)
alias(libs.plugins.apollo).apply(false)
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,6 @@ extend schema
import: ["@cacheControl", "@cacheControlField"]
)

# Workaround for https://github.com/apollographql/apollo-kotlin/pull/6284
# Remove when the fix is released
directive @link(
url: String!,
as: String,
import: [Import],
for: Purpose)
repeatable on SCHEMA

extend type Query
@fieldPolicy(forField: "user" keyArgs: "id")
@fieldPolicy(forField: "users" keyArgs: "ids")
Expand Down
22 changes: 18 additions & 4 deletions tests/kotlin-js-store/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,13 @@ js-yaml@^4.1.0:
dependencies:
argparse "^2.0.1"

kotlin-web-helpers@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/kotlin-web-helpers/-/kotlin-web-helpers-2.0.0.tgz#b112096b273c1e733e0b86560998235c09a19286"
integrity sha512-xkVGl60Ygn/zuLkDPx+oHj7jeLR7hCvoNF99nhwXMn8a3ApB4lLiC9pk4ol4NHPjyoCbvQctBqvzUcp8pkqyWw==
dependencies:
format-util "^1.0.5"

locate-path@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286"
Expand All @@ -308,10 +315,10 @@ minimatch@^5.0.1, minimatch@^5.1.6:
dependencies:
brace-expansion "^2.0.1"

mocha@10.7.0:
version "10.7.0"
resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.7.0.tgz#9e5cbed8fa9b37537a25bd1f7fb4f6fc45458b9a"
integrity sha512-v8/rBWr2VO5YkspYINnvu81inSz2y3ODJrhO175/Exzor1RcEZZkizgE2A+w/CAXXoESS8Kys5E62dOHGHzULA==
mocha@10.7.3:
version "10.7.3"
resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.7.3.tgz#ae32003cabbd52b59aece17846056a68eb4b0752"
integrity sha512-uQWxAu44wwiACGqjbPYmjo7Lg8sFrS3dQe7PP2FQI+woptP4vZXSMcfMyFL/e1yFEeEpV4RtyTpZROOKmxis+A==
dependencies:
ansi-colors "^4.1.3"
browser-stdout "^1.3.1"
Expand Down Expand Up @@ -346,6 +353,13 @@ node-fetch@2.6.7:
dependencies:
whatwg-url "^5.0.0"

node-fetch@2.7.0:
version "2.7.0"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d"
integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==
dependencies:
whatwg-url "^5.0.0"

normalize-path@^3.0.0, normalize-path@~3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
Expand Down