plugins { id 'java' id 'application' id 'org.openjfx.javafxplugin' version '0.1.0' id 'org.beryx.jlink' version '2.26.0' } group = 'org.example' version = '2.0.1' description = 'ClickMaster Pro - Advanced Clicking Automation Tool' java { sourceCompatibility = JavaVersion.VERSION_21 targetCompatibility = JavaVersion.VERSION_21 } repositories { mavenCentral() maven { url 'https://jitpack.io' } } dependencies { // JavaFX 21.0.2 - Modüler yapı için implementation 'org.openjfx:javafx-controls:21.0.2' implementation 'org.openjfx:javafx-fxml:21.0.2' implementation 'org.openjfx:javafx-graphics:21.0.2' implementation 'org.openjfx:javafx-base:21.0.2' // JNativeHook 2.2.2 - Global hotkey desteği implementation 'com.github.kwhat:jnativehook:2.2.2' // Jackson JSON işleme implementation 'com.fasterxml.jackson.core:jackson-core:2.15.2' implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.2' // Logback logging framework implementation 'ch.qos.logback:logback-classic:1.4.11' implementation 'ch.qos.logback:logback-core:1.4.11' implementation 'org.slf4j:slf4j-api:2.0.9' // Test dependencies testImplementation 'org.junit.jupiter:junit-jupiter:5.10.0' testRuntimeOnly 'org.junit.platform:junit-platform-launcher' } application { mainClass = 'org.example.ClickMasterApp' // mainModule kaldırıldı - modül path ile çalışacak } javafx { version = '21.0.2' modules = ['javafx.controls', 'javafx.fxml', 'javafx.graphics', 'javafx.base'] // IntelliJ IDEA için ek ayarlar configuration = 'compileOnly' } test { useJUnitPlatform() testLogging { events "passed", "skipped", "failed" } // Test için JavaFX modülleri ve modül path jvmArgs = [ '--add-modules', 'javafx.controls,javafx.fxml,javafx.graphics,javafx.base', '--module-path', configurations.compileClasspath.asPath ] } // Modüler yapı için gerekli ayarlar compileJava { options.compilerArgs += ['--add-modules', 'javafx.controls,javafx.fxml,javafx.graphics,javafx.base'] } compileTestJava { options.compilerArgs += ['--add-modules', 'javafx.controls,javafx.fxml,javafx.graphics,javafx.base'] options.compilerArgs += ['--module-path', configurations.compileClasspath.asPath] } run { // Modül path ayarları jvmArgs = [ '--add-modules', 'javafx.controls,javafx.fxml,javafx.graphics,javafx.base', '--add-opens', 'java.base/java.lang=ALL-UNNAMED', '--add-opens', 'java.base/java.util=ALL-UNNAMED', '--add-opens', 'java.desktop/java.awt=ALL-UNNAMED', '--add-opens', 'java.desktop/java.awt.event=ALL-UNNAMED', '--module-path', configurations.runtimeClasspath.asPath ] // IntelliJ IDEA için ek ayarlar standardInput = System.in standardOutput = System.out errorOutput = System.err } // JPackage görevi - Windows MSI installer // Not: JPackage görevi için önce jlink ile runtime image oluşturulmalı // Basit yapılandırma - detaylı ayarlar daha sonra eklenebilir // JLink görevi - Custom runtime image jlink { options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages'] launcher { name = 'clickmaster' mainClass = 'org.example.ClickMasterApp' } } // JLink görevi JAR'a bağımlı olsun tasks.jlink.dependsOn tasks.jar // Gradle wrapper güncelleme wrapper { gradleVersion = '8.5' distributionType = Wrapper.DistributionType.BIN } // Modüler yapı için ek ayarlar tasks.withType(JavaCompile) { options.encoding = 'UTF-8' options.compilerArgs += ['--add-modules', 'javafx.controls,javafx.fxml,javafx.graphics,javafx.base'] } // Modüler yapı için JAR oluşturma - JLink için gerekli jar { enabled = true archiveBaseName = 'ClickMaster Pro' archiveVersion = version // Modül bilgilerini JAR'a ekle manifest { attributes( 'Main-Class': 'org.example.ClickMasterApp', 'Implementation-Title': 'ClickMaster Pro', 'Implementation-Version': version, 'Implementation-Vendor': 'ClickMaster Team' ) } }