-
Notifications
You must be signed in to change notification settings - Fork 662
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add apollo-execution and apollo-ksp (#5281)
* add apollo-execution and apollo-ksp * Allo to disable publication of modules (#5282) * move build logic to plain APIS * disable publishing * remove unused function * enable publishing of apollo-normalized-cache-*-incubating * add comment * remove unused source/target compatibility. They are overriden by --release * Use apollo-execution in our integration tests (#5288) * use apollo-execution for integration tests * unhide a bunch of internals * more comments * hide some of the websocket implementation (#5291) * Make CodegenLayout internal again, use CodegenMetadata.resolveSchemaType instead (#5292) * make CodegenLayout internal again, use CodegenMetadata.resolveSchemaType instead * Update libraries/apollo-ksp/src/main/kotlin/com/apollographql/apollo3/ksp/ksp-validation.kt Co-authored-by: Benoit Lubek <[email protected]> --------- Co-authored-by: Benoit Lubek <[email protected]> --------- Co-authored-by: Benoit Lubek <[email protected]>
- Loading branch information
1 parent
1ed167a
commit bdf78aa
Showing
257 changed files
with
5,659 additions
and
1,599 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import org.gradle.api.Project | ||
import org.gradle.jvm.tasks.Jar | ||
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension | ||
|
||
fun Project.apolloLibrary( | ||
javaModuleName: String?, | ||
withJs: Boolean = true, | ||
withLinux: Boolean = true, | ||
publish: Boolean = true | ||
) { | ||
group = property("GROUP")!! | ||
version = property("VERSION_NAME")!! | ||
|
||
commonSetup() | ||
|
||
configureJavaAndKotlinCompilers() | ||
addOptIn( | ||
"com.apollographql.apollo3.annotations.ApolloExperimental", | ||
"com.apollographql.apollo3.annotations.ApolloInternal" | ||
) | ||
|
||
configureTesting() | ||
|
||
if (publish) { | ||
configurePublishing() | ||
} | ||
|
||
// Within the 'tests' project (a composite build), dependencies are automatically substituted to use the project's one. | ||
// But we don't want this, for example apollo-tooling depends on a published version of apollo-api. | ||
// So disable this behavior (see https://docs.gradle.org/current/userguide/composite_builds.html#deactivate_included_build_substitutions). | ||
configurations.all { | ||
resolutionStrategy.useGlobalDependencySubstitutionRules.set(false) | ||
} | ||
|
||
if (extensions.findByName("kotlin") is KotlinMultiplatformExtension) { | ||
configureMppDefaults( | ||
withJs, | ||
withLinux, | ||
extensions.findByName("android") != null | ||
) | ||
} | ||
|
||
if (javaModuleName != null) { | ||
tasks.withType(Jar::class.java).configureEach { | ||
manifest { | ||
attributes(mapOf("Automatic-Module-Name" to javaModuleName)) | ||
} | ||
} | ||
} | ||
} | ||
|
||
fun Project.apolloTest( | ||
withJs: Boolean = true, | ||
withJvm: Boolean = true, | ||
appleTargets: Set<String> = setOf(hostTarget), | ||
browserTest: Boolean = false, | ||
) { | ||
commonSetup() | ||
configureJavaAndKotlinCompilers() | ||
addOptIn( | ||
"com.apollographql.apollo3.annotations.ApolloExperimental", | ||
"com.apollographql.apollo3.annotations.ApolloInternal", | ||
) | ||
configureTesting() | ||
|
||
if (extensions.findByName("kotlin") is KotlinMultiplatformExtension) { | ||
configureMppTestsDefaults( | ||
withJs = withJs, | ||
withJvm = withJvm, | ||
browserTest = browserTest, | ||
appleTargets = appleTargets, | ||
) | ||
} | ||
} |
76 changes: 0 additions & 76 deletions
76
...ic/src/main/kotlin/com/apollographql/apollo3/buildlogic/plugin/LibraryConventionPlugin.kt
This file was deleted.
Oops, something went wrong.
57 changes: 0 additions & 57 deletions
57
...logic/src/main/kotlin/com/apollographql/apollo3/buildlogic/plugin/TestConventionPlugin.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.