Skip to content

Commit

Permalink
Replace deprecated JavaPluginConvention
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbakker committed Jan 17, 2022
1 parent 751f0b7 commit 902111f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.logging.Logging
import org.gradle.api.plugins.JavaPlugin
import org.gradle.api.plugins.JavaPluginConvention
import org.gradle.api.plugins.JavaPluginExtension
import org.gradle.api.tasks.SourceSet
import java.util.Optional

Expand All @@ -48,7 +48,7 @@ class CodegenPlugin : Plugin<Project> {
it.dependsOn(generateJavaTaskProvider.get())
}

val javaConvention = project.convention.getPlugin(JavaPluginConvention::class.java)
val javaConvention = project.extensions.getByType(JavaPluginExtension::class.java)
val sourceSets = javaConvention.sourceSets
val mainSourceSet = sourceSets.getByName(SourceSet.MAIN_SOURCE_SET_NAME)
val outputDir = generateJavaTaskProvider.get().getOutputDir()
Expand Down

0 comments on commit 902111f

Please sign in to comment.