Skip to content

Commit

Permalink
Merge pull request #59 from domaframework/refactor/replace-deprecated…
Browse files Browse the repository at this point in the history
…-api

Replace deprecated APIs
  • Loading branch information
nakamura-to authored Sep 29, 2024
2 parents 7170d4c + b68c88e commit 1c565d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.gradle.api.plugins.JavaPlugin;
import org.gradle.api.plugins.JavaPluginConvention;
import org.gradle.api.plugins.JavaPluginExtension;
import org.gradle.api.tasks.SourceSet;

public class CompilePlugin implements Plugin<Project> {
Expand All @@ -15,10 +15,10 @@ public void apply(Project project) {
.withType(
JavaPlugin.class,
javaPlugin -> {
JavaPluginConvention javaConvention =
project.getConvention().getPlugin(JavaPluginConvention.class);
JavaPluginExtension javaPluginExtension =
project.getExtensions().getByType(JavaPluginExtension.class);
SourceSet mainSourceSet =
javaConvention.getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME);
javaPluginExtension.getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME);
ConfigureJava.configure(project, mainSourceSet);
ConfigureKotlin.configure(project, mainSourceSet);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static void configure(Project project, SourceSet sourceSet) {
CopyResources.NAME + "Java",
CopyResources.class,
sourceSet,
javaCompile.getDestinationDir());
javaCompile.getDestinationDirectory());

javaCompile.dependsOn(copyResources);
processResources.configure(task -> task.exclude(CopyResources.DOMA_RESOURCES));
Expand Down

0 comments on commit 1c565d6

Please sign in to comment.