-
Notifications
You must be signed in to change notification settings - Fork 662
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
Conversation
✅ Deploy Preview for apollo-android-docs canceled.
|
@@ -252,6 +254,31 @@ abstract class DefaultApolloExtension( | |||
} | |||
} | |||
|
|||
@Suppress("ObjectLiteralToLambda") | |||
private fun registerCheckLegacyJsTargetTask(): TaskProvider<Task> { | |||
return project.tasks.register(ModelNames.checkLegacyJsTarget()) { |
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.
Do we need a task for that? Could we just fail at configuration time, maybe using afterEvaluate {}
🙃 ?
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.
Haha I guess! I'll have a look.
...external/src/main/kotlin/com/apollographql/apollo3/gradle/internal/DefaultApolloExtension.kt
Outdated
Show resolved
Hide resolved
…ollographql/apollo3/gradle/internal/DefaultApolloExtension.kt Co-authored-by: Martin Bonnin <[email protected]>
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." |
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.
We need to add something in the CHANGELOG about this, certainly link to the Kotlin changelog too
Related to #4590