File tree Expand file tree Collapse file tree
semanticdb-gradle-plugin/src/main/scala Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ lazy val V =
1212 val scipBindings = " 0.8.0"
1313 val scalaXml = " 2.1.0"
1414 val moped = " 0.2.0"
15- val gradle = " 7.0 "
15+ val gradle = " 8.10 "
1616 val scala213 = " 2.13.13"
1717 val scalameta = " 4.9.3"
1818 val kotlinVersion = " 2.2.0"
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ import com.sourcegraph.scip_java.BuildInfo
1111import org .gradle .api .DefaultTask
1212import org .gradle .api .Plugin
1313import org .gradle .api .Project
14- import org .gradle .api .provider .Property
1514import org .gradle .api .publish .PublishingExtension
1615import org .gradle .api .publish .maven .MavenPublication
1716import org .gradle .api .tasks .SourceSetContainer
@@ -106,28 +105,11 @@ class SemanticdbGradlePlugin extends Plugin[Project] {
106105 .configureEach { task =>
107106 // On JDK 17+ we need --add-exports flags to allow our compiler
108107 // plugin to access javac internals.
109- type JavaCompiler = {
110- type Metadata = {
111- type LangVersion = {
112- def asInt (): Int
113- }
114- def getLanguageVersion (): LangVersion
115- }
116- def getMetadata (): Metadata
117- }
118-
119- type HasCompilerProperty = {
120- def getJavaCompiler (): Property [JavaCompiler ]
121- }
122-
123- val toolchainCompiler = Option (
124- task
125- .asInstanceOf [HasCompilerProperty ]
126- .getJavaCompiler()
127- .getOrNull()
108+ val toolchainJavaVersion = Option (
109+ task.getJavaCompiler().getOrNull()
128110 ).map(_.getMetadata().getLanguageVersion().asInt())
129111
130- val effectiveJavaVersion = toolchainCompiler .getOrElse(
112+ val effectiveJavaVersion = toolchainJavaVersion .getOrElse(
131113 Runtime .version().feature()
132114 )
133115
You can’t perform that action at this time.
0 commit comments