Skip to content
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

Don't publish legacy js artifacts #4591

Merged
merged 4 commits into from Dec 20, 2022
Merged

Conversation

BoD
Copy link
Contributor

@BoD BoD commented Dec 19, 2022

Related to #4590

@netlify
Copy link

netlify bot commented Dec 19, 2022

Deploy Preview for apollo-android-docs canceled.

Name Link
🔨 Latest commit 46a574f
🔍 Latest deploy log https://app.netlify.com/sites/apollo-android-docs/deploys/63a0b2c87a8bc300083cb905

@@ -252,6 +254,31 @@ abstract class DefaultApolloExtension(
}
}

@Suppress("ObjectLiteralToLambda")
private fun registerCheckLegacyJsTargetTask(): TaskProvider<Task> {
return project.tasks.register(ModelNames.checkLegacyJsTarget()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a task for that? Could we just fail at configuration time, maybe using afterEvaluate {} 🙃 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha I guess! I'll have a look.

BoD and others added 2 commits December 19, 2022 18:34
…ollographql/apollo3/gradle/internal/DefaultApolloExtension.kt

Co-authored-by: Martin Bonnin <martin@mbonnin.net>
val kotlin = project.extensions.findByName("kotlin") as? KotlinMultiplatformExtension
val hasLegacyJsTarget = kotlin?.targets?.any { target -> target is KotlinJsTarget && target.irTarget == null } == true
check(!hasLegacyJsTarget) {
"Apollo: LEGACY js target is not supported by Apollo, please use IR."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to add something in the CHANGELOG about this, certainly link to the Kotlin changelog too

@BoD BoD merged commit f6cbc45 into main Dec 20, 2022
@BoD BoD deleted the dont-publish-legacy-js-artifacts branch December 20, 2022 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants