diff --git a/build.gradle b/build.gradle index d8bb679..c01e04c 100644 --- a/build.gradle +++ b/build.gradle @@ -1,18 +1,43 @@ plugins { id 'net.ltgt.errorprone' version '4.3.0' apply false id 'com.diffplug.spotless' version '7.2.1' apply false + id 'java' } subprojects { repositories { mavenCentral() } - + // TODO: better spotless integration to support groovy etc... + apply plugin: 'com.diffplug.spotless' plugins.withId('java') { java { toolchain { languageVersion = JavaLanguageVersion.of(25) } } + + spotless { + java { + googleJavaFormat('1.22.0') + } + } + } +} + +allprojects { + apply plugin: 'eclipse' + eclipse.classpath { + defaultOutputDir = file("build/default") + file.whenMerged { cp -> + cp.entries.forEach { cpe -> + if (cpe instanceof org.gradle.plugins.ide.eclipse.model.SourceFolder) { + cpe.output = cpe.output.replace "bin/", "build/classes/java/" + } + if (cpe instanceof org.gradle.plugins.ide.eclipse.model.Output) { + cpe.path = cpe.path.replace "bin/", "build/" + } + } + } } } diff --git a/framework/build.gradle b/framework/build.gradle index 6a2735e..9183049 100644 --- a/framework/build.gradle +++ b/framework/build.gradle @@ -1,7 +1,6 @@ plugins { id 'java' id 'net.ltgt.errorprone' - id 'com.diffplug.spotless' } dependencies { diff --git a/framework/src/main/java/io/github/eisop/runtimeframework/agent/RuntimeAgent.java b/framework/src/main/java/io/github/eisop/runtimeframework/agent/RuntimeAgent.java index c5319bc..7d1acad 100644 --- a/framework/src/main/java/io/github/eisop/runtimeframework/agent/RuntimeAgent.java +++ b/framework/src/main/java/io/github/eisop/runtimeframework/agent/RuntimeAgent.java @@ -1,9 +1,7 @@ package io.github.eisop.runtimeframework.agent; -import java.lang.instrument.Instrumentation; - public class RuntimeAgent { - public static void premain(String args, java.lang.instrument.Instrumentation inst) { - System.out.println("Agent Initialized"); - } + public static void premain(String args, java.lang.instrument.Instrumentation inst) { + System.out.println("Agent Initialized"); + } }