From 395b2103549842f24a37f73ba4521c166f0839d3 Mon Sep 17 00:00:00 2001 From: Roan Hofland Date: Sun, 23 May 2021 02:50:34 +0200 Subject: [PATCH 1/2] Initial 2.2 snapshot update Should be noted that this is currently broken and fails with an UnsatisfiedLinkError to the native library. --- KeysPerSecond/build.gradle | 6 +++++- KeysPerSecond/src/me/roan/kps/CommandKeys.java | 2 +- KeysPerSecond/src/me/roan/kps/Configuration.java | 2 +- KeysPerSecond/src/me/roan/kps/Main.java | 14 +++++++------- .../src/me/roan/kps/ui/dialog/KeysDialog.java | 2 +- 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/KeysPerSecond/build.gradle b/KeysPerSecond/build.gradle index 35f6757c..912b37e6 100644 --- a/KeysPerSecond/build.gradle +++ b/KeysPerSecond/build.gradle @@ -37,11 +37,15 @@ repositories{ maven{ url "https://jitpack.io" } + maven{ + url "https://oss.sonatype.org" + } } dependencies{ implementation 'com.github.RoanH:Util:v1.6' - implementation 'com.1stleg:jnativehook:2.1.0' + implementation 'com.github.kwhat:jnativehook:2.2-SNAPSHOT' + //implementation 'com.github.kwhat:jnativehook:2.2-20210323.163306-38' } application{ diff --git a/KeysPerSecond/src/me/roan/kps/CommandKeys.java b/KeysPerSecond/src/me/roan/kps/CommandKeys.java index d356333d..ed3eba1c 100644 --- a/KeysPerSecond/src/me/roan/kps/CommandKeys.java +++ b/KeysPerSecond/src/me/roan/kps/CommandKeys.java @@ -7,7 +7,7 @@ import javax.swing.JLabel; import javax.swing.JPanel; -import org.jnativehook.keyboard.NativeKeyEvent; +import com.github.kwhat.jnativehook.keyboard.NativeKeyEvent; import me.roan.util.Dialog; diff --git a/KeysPerSecond/src/me/roan/kps/Configuration.java b/KeysPerSecond/src/me/roan/kps/Configuration.java index 3dd2a8f7..b1b262b8 100644 --- a/KeysPerSecond/src/me/roan/kps/Configuration.java +++ b/KeysPerSecond/src/me/roan/kps/Configuration.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.concurrent.TimeUnit; -import org.jnativehook.keyboard.NativeKeyEvent; +import com.github.kwhat.jnativehook.keyboard.NativeKeyEvent; import me.roan.kps.CommandKeys.CMD; import me.roan.kps.Main.KeyInformation; diff --git a/KeysPerSecond/src/me/roan/kps/Main.java b/KeysPerSecond/src/me/roan/kps/Main.java index bbba6f4a..fe044aaa 100644 --- a/KeysPerSecond/src/me/roan/kps/Main.java +++ b/KeysPerSecond/src/me/roan/kps/Main.java @@ -50,13 +50,13 @@ import javax.swing.SwingConstants; import javax.swing.SwingUtilities; -import org.jnativehook.GlobalScreen; -import org.jnativehook.NativeHookException; -import org.jnativehook.NativeInputEvent; -import org.jnativehook.keyboard.NativeKeyEvent; -import org.jnativehook.keyboard.NativeKeyListener; -import org.jnativehook.mouse.NativeMouseEvent; -import org.jnativehook.mouse.NativeMouseListener; +import com.github.kwhat.jnativehook.GlobalScreen; +import com.github.kwhat.jnativehook.NativeHookException; +import com.github.kwhat.jnativehook.NativeInputEvent; +import com.github.kwhat.jnativehook.keyboard.NativeKeyEvent; +import com.github.kwhat.jnativehook.keyboard.NativeKeyListener; +import com.github.kwhat.jnativehook.mouse.NativeMouseEvent; +import com.github.kwhat.jnativehook.mouse.NativeMouseListener; import me.roan.kps.CommandKeys.CMD; import me.roan.kps.layout.GridPanel; diff --git a/KeysPerSecond/src/me/roan/kps/ui/dialog/KeysDialog.java b/KeysPerSecond/src/me/roan/kps/ui/dialog/KeysDialog.java index 5ed8f446..aa109846 100644 --- a/KeysPerSecond/src/me/roan/kps/ui/dialog/KeysDialog.java +++ b/KeysPerSecond/src/me/roan/kps/ui/dialog/KeysDialog.java @@ -14,7 +14,7 @@ import javax.swing.JTable; import javax.swing.table.DefaultTableModel; -import org.jnativehook.keyboard.NativeKeyEvent; +import com.github.kwhat.jnativehook.keyboard.NativeKeyEvent; import me.roan.kps.CommandKeys; import me.roan.kps.Main; From df685abd10cfe501aa713e5f18c27e44efd07a1a Mon Sep 17 00:00:00 2001 From: Roan Hofland Date: Sun, 23 May 2021 04:35:26 +0200 Subject: [PATCH 2/2] Resolve dependency issues --- KeysPerSecond/build.gradle | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/KeysPerSecond/build.gradle b/KeysPerSecond/build.gradle index 912b37e6..f89ca376 100644 --- a/KeysPerSecond/build.gradle +++ b/KeysPerSecond/build.gradle @@ -33,19 +33,17 @@ repositories{ url "$nexusPublic" } } - jcenter() maven{ - url "https://jitpack.io" + url "https://oss.sonatype.org/content/repositories/snapshots" } maven{ - url "https://oss.sonatype.org" + url "https://jitpack.io" } } dependencies{ implementation 'com.github.RoanH:Util:v1.6' - implementation 'com.github.kwhat:jnativehook:2.2-SNAPSHOT' - //implementation 'com.github.kwhat:jnativehook:2.2-20210323.163306-38' + implementation 'com.github.kwhat:jnativehook:2.2-20210323.163306-38' } application{