Skip to content

Instantly share code, notes, and snippets.

@martinbonnin
Created July 11, 2023 11:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martinbonnin/c46a4b44fd3c4d5db6e737cc60dedd4e to your computer and use it in GitHub Desktop.
Save martinbonnin/c46a4b44fd3c4d5db6e737cc60dedd4e to your computer and use it in GitHub Desktop.
#!/usr/bin/env kotlin
@file:Repository("file:///Users/mbonnin/git/apollo-kotlin/build/localMaven")
@file:Repository("https://repo.maven.apache.org/maven2/")
@file:DependsOn("com.apollographql.apollo3:apollo-gradle-plugin:4.0.0-alpha.3-SNAPSHOT")
@file:DependsOn("org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.6.2")
import com.apollographql.apollo3.gradle.api.ApolloExtension
import kotlinx.metadata.jvm.KotlinClassMetadata
val annotation = ApolloExtension::class.java.annotations[0] as Metadata
val metadata = KotlinClassMetadata.read(annotation) as KotlinClassMetadata.Class
val kmClass = metadata.toKmClass()
println(kmClass.versionRequirements.map { it.version.toString() })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment