From d74e2cd3a4a932276984e8fed4811c7442600eba Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Wed, 15 Jul 2026 16:11:41 +0200 Subject: [PATCH 1/2] chore(android): include keyman-engine as sub-project Adding keyman-engine as a sub-project to KMAPro as well as the sample apps and KeyboardHarness allows Android Studio to load both at the same time which makes it easier to debug and develop. Test-bot: skip --- android/KMAPro/kMAPro/build.gradle | 2 +- android/KMAPro/settings.gradle | 2 ++ android/Samples/KMSample1/app/build.gradle | 2 +- android/Samples/KMSample1/build.gradle | 2 ++ android/Samples/KMSample1/settings.gradle | 2 ++ android/Samples/KMSample2/app/build.gradle | 2 +- android/Samples/KMSample2/build.gradle | 2 ++ android/Samples/KMSample2/settings.gradle | 2 ++ android/Tests/KeyboardHarness/app/build.gradle | 2 +- android/Tests/KeyboardHarness/build.gradle | 2 ++ android/Tests/KeyboardHarness/settings.gradle | 2 ++ oem/firstvoices/android/app/build.gradle | 2 +- oem/firstvoices/android/build.gradle | 2 ++ oem/firstvoices/android/settings.gradle | 2 ++ 14 files changed, 23 insertions(+), 5 deletions(-) diff --git a/android/KMAPro/kMAPro/build.gradle b/android/KMAPro/kMAPro/build.gradle index cb5e52731a5..39d5ad0caa2 100644 --- a/android/KMAPro/kMAPro/build.gradle +++ b/android/KMAPro/kMAPro/build.gradle @@ -173,7 +173,7 @@ dependencies { implementation 'com.google.android.material:material:1.12.0' implementation 'com.stepstone.stepper:material-stepper:4.3.1' implementation 'androidx.webkit:webkit:1.14.0' - implementation files('libs/keyman-engine.aar') + implementation project(':keyman-engine') implementation 'io.sentry:sentry-android:8.19.1' implementation 'androidx.preference:preference:1.2.1' implementation 'com.android.installreferrer:installreferrer:2.2' diff --git a/android/KMAPro/settings.gradle b/android/KMAPro/settings.gradle index 0493ed2a0b8..9f4c86e4be3 100644 --- a/android/KMAPro/settings.gradle +++ b/android/KMAPro/settings.gradle @@ -1 +1,3 @@ include ':kMAPro' +include ':keyman-engine' +project(':keyman-engine').projectDir = new File(settingsDir, '../KMEA/app') \ No newline at end of file diff --git a/android/Samples/KMSample1/app/build.gradle b/android/Samples/KMSample1/app/build.gradle index 4643d0e796e..40a3d1bd656 100644 --- a/android/Samples/KMSample1/app/build.gradle +++ b/android/Samples/KMSample1/app/build.gradle @@ -59,7 +59,7 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.7.0' implementation 'androidx.constraintlayout:constraintlayout:2.2.1' implementation 'com.google.android.material:material:1.12.0' - implementation files('libs/keyman-engine.aar') + implementation project(':keyman-engine') implementation 'androidx.preference:preference:1.2.1' implementation 'androidx.webkit:webkit:1.14.0' } diff --git a/android/Samples/KMSample1/build.gradle b/android/Samples/KMSample1/build.gradle index 43ca9c592c9..5770ce2b1cf 100644 --- a/android/Samples/KMSample1/build.gradle +++ b/android/Samples/KMSample1/build.gradle @@ -7,6 +7,7 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:8.9.2' + classpath 'name.remal:gradle-plugins:1.9.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -17,5 +18,6 @@ allprojects { repositories { google() mavenCentral() + maven { url "https://jitpack.io" } } } diff --git a/android/Samples/KMSample1/settings.gradle b/android/Samples/KMSample1/settings.gradle index e7b4def49cb..84ce9aff1db 100644 --- a/android/Samples/KMSample1/settings.gradle +++ b/android/Samples/KMSample1/settings.gradle @@ -1 +1,3 @@ include ':app' +include ':keyman-engine' +project(':keyman-engine').projectDir = new File(settingsDir, '../../KMEA/app') \ No newline at end of file diff --git a/android/Samples/KMSample2/app/build.gradle b/android/Samples/KMSample2/app/build.gradle index a3c9658056b..eab53ac0edf 100644 --- a/android/Samples/KMSample2/app/build.gradle +++ b/android/Samples/KMSample2/app/build.gradle @@ -59,7 +59,7 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.7.0' implementation 'androidx.constraintlayout:constraintlayout:2.2.1' implementation 'com.google.android.material:material:1.12.0' - implementation files('libs/keyman-engine.aar') + implementation project(':keyman-engine') implementation 'androidx.preference:preference:1.2.1' implementation 'androidx.webkit:webkit:1.14.0' } diff --git a/android/Samples/KMSample2/build.gradle b/android/Samples/KMSample2/build.gradle index 43ca9c592c9..5770ce2b1cf 100644 --- a/android/Samples/KMSample2/build.gradle +++ b/android/Samples/KMSample2/build.gradle @@ -7,6 +7,7 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:8.9.2' + classpath 'name.remal:gradle-plugins:1.9.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -17,5 +18,6 @@ allprojects { repositories { google() mavenCentral() + maven { url "https://jitpack.io" } } } diff --git a/android/Samples/KMSample2/settings.gradle b/android/Samples/KMSample2/settings.gradle index e7b4def49cb..84ce9aff1db 100644 --- a/android/Samples/KMSample2/settings.gradle +++ b/android/Samples/KMSample2/settings.gradle @@ -1 +1,3 @@ include ':app' +include ':keyman-engine' +project(':keyman-engine').projectDir = new File(settingsDir, '../../KMEA/app') \ No newline at end of file diff --git a/android/Tests/KeyboardHarness/app/build.gradle b/android/Tests/KeyboardHarness/app/build.gradle index 070ee5c63b1..a601257db98 100644 --- a/android/Tests/KeyboardHarness/app/build.gradle +++ b/android/Tests/KeyboardHarness/app/build.gradle @@ -59,7 +59,7 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.7.0' implementation 'androidx.constraintlayout:constraintlayout:2.2.1' implementation 'com.google.android.material:material:1.12.0' - implementation files('libs/keyman-engine.aar') + implementation project(':keyman-engine') implementation 'androidx.preference:preference:1.2.1' implementation 'androidx.webkit:webkit:1.14.0' } diff --git a/android/Tests/KeyboardHarness/build.gradle b/android/Tests/KeyboardHarness/build.gradle index 966127346a8..f990a34a2f7 100644 --- a/android/Tests/KeyboardHarness/build.gradle +++ b/android/Tests/KeyboardHarness/build.gradle @@ -7,6 +7,7 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:8.9.2' + classpath 'name.remal:gradle-plugins:1.9.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -18,5 +19,6 @@ allprojects { maven { url uri("${projectDir}/libs") } google() mavenCentral() + maven { url "https://jitpack.io" } } } diff --git a/android/Tests/KeyboardHarness/settings.gradle b/android/Tests/KeyboardHarness/settings.gradle index e7b4def49cb..79b9c4ef87b 100644 --- a/android/Tests/KeyboardHarness/settings.gradle +++ b/android/Tests/KeyboardHarness/settings.gradle @@ -1 +1,3 @@ include ':app' +include ':keyman-engine' +project(':keyman-engine').projectDir = new File(settingsDir, '../../KMEA/app') diff --git a/oem/firstvoices/android/app/build.gradle b/oem/firstvoices/android/app/build.gradle index b09fe58fd1a..ed1686acacf 100644 --- a/oem/firstvoices/android/app/build.gradle +++ b/oem/firstvoices/android/app/build.gradle @@ -134,7 +134,7 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.7.0' implementation 'androidx.constraintlayout:constraintlayout:2.2.1' implementation 'com.google.android.material:material:1.12.0' - implementation files('libs/keyman-engine.aar') + implementation project(':keyman-engine') implementation 'io.sentry:sentry-android:8.19.1' implementation 'androidx.preference:preference:1.2.1' implementation 'androidx.webkit:webkit:1.14.0' diff --git a/oem/firstvoices/android/build.gradle b/oem/firstvoices/android/build.gradle index f24c9cdc53a..f66ed85dbde 100644 --- a/oem/firstvoices/android/build.gradle +++ b/oem/firstvoices/android/build.gradle @@ -7,6 +7,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:8.9.2' + classpath 'name.remal:gradle-plugins:1.9.2' classpath 'io.sentry:sentry-android-gradle-plugin:5.9.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -17,5 +18,6 @@ allprojects { repositories { google() mavenCentral() + maven { url "https://jitpack.io" } } } diff --git a/oem/firstvoices/android/settings.gradle b/oem/firstvoices/android/settings.gradle index e7b4def49cb..0fb652a40bc 100644 --- a/oem/firstvoices/android/settings.gradle +++ b/oem/firstvoices/android/settings.gradle @@ -1 +1,3 @@ include ':app' +include ':keyman-engine' +project(':keyman-engine').projectDir = new File(settingsDir, '../../../android/KMEA/app') \ No newline at end of file From 8f62333e995977f2f85fd9eaa7ce4f7fa740231a Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Thu, 20 Aug 2026 12:10:57 +0200 Subject: [PATCH 2/2] chore(android): address code review comments Sample apps should not reference the project but the .aar instead. --- android/Samples/KMSample1/app/build.gradle | 3 ++- android/Samples/KMSample1/build.gradle | 2 -- android/Samples/KMSample1/settings.gradle | 2 -- android/Samples/KMSample2/app/build.gradle | 3 ++- android/Samples/KMSample2/build.gradle | 2 -- android/Samples/KMSample2/settings.gradle | 2 -- 6 files changed, 4 insertions(+), 10 deletions(-) diff --git a/android/Samples/KMSample1/app/build.gradle b/android/Samples/KMSample1/app/build.gradle index 40a3d1bd656..47a3c6b229d 100644 --- a/android/Samples/KMSample1/app/build.gradle +++ b/android/Samples/KMSample1/app/build.gradle @@ -59,7 +59,8 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.7.0' implementation 'androidx.constraintlayout:constraintlayout:2.2.1' implementation 'com.google.android.material:material:1.12.0' - implementation project(':keyman-engine') + // intentionally not referencing the keyman-engine project but the .aar instead + implementation files('libs/keyman-engine.aar') implementation 'androidx.preference:preference:1.2.1' implementation 'androidx.webkit:webkit:1.14.0' } diff --git a/android/Samples/KMSample1/build.gradle b/android/Samples/KMSample1/build.gradle index 5770ce2b1cf..43ca9c592c9 100644 --- a/android/Samples/KMSample1/build.gradle +++ b/android/Samples/KMSample1/build.gradle @@ -7,7 +7,6 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:8.9.2' - classpath 'name.remal:gradle-plugins:1.9.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -18,6 +17,5 @@ allprojects { repositories { google() mavenCentral() - maven { url "https://jitpack.io" } } } diff --git a/android/Samples/KMSample1/settings.gradle b/android/Samples/KMSample1/settings.gradle index 84ce9aff1db..e7b4def49cb 100644 --- a/android/Samples/KMSample1/settings.gradle +++ b/android/Samples/KMSample1/settings.gradle @@ -1,3 +1 @@ include ':app' -include ':keyman-engine' -project(':keyman-engine').projectDir = new File(settingsDir, '../../KMEA/app') \ No newline at end of file diff --git a/android/Samples/KMSample2/app/build.gradle b/android/Samples/KMSample2/app/build.gradle index eab53ac0edf..d855c845829 100644 --- a/android/Samples/KMSample2/app/build.gradle +++ b/android/Samples/KMSample2/app/build.gradle @@ -59,7 +59,8 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.7.0' implementation 'androidx.constraintlayout:constraintlayout:2.2.1' implementation 'com.google.android.material:material:1.12.0' - implementation project(':keyman-engine') + // intentionally not referencing the keyman-engine project but the .aar instead + implementation files('libs/keyman-engine.aar') implementation 'androidx.preference:preference:1.2.1' implementation 'androidx.webkit:webkit:1.14.0' } diff --git a/android/Samples/KMSample2/build.gradle b/android/Samples/KMSample2/build.gradle index 5770ce2b1cf..43ca9c592c9 100644 --- a/android/Samples/KMSample2/build.gradle +++ b/android/Samples/KMSample2/build.gradle @@ -7,7 +7,6 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:8.9.2' - classpath 'name.remal:gradle-plugins:1.9.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -18,6 +17,5 @@ allprojects { repositories { google() mavenCentral() - maven { url "https://jitpack.io" } } } diff --git a/android/Samples/KMSample2/settings.gradle b/android/Samples/KMSample2/settings.gradle index 84ce9aff1db..e7b4def49cb 100644 --- a/android/Samples/KMSample2/settings.gradle +++ b/android/Samples/KMSample2/settings.gradle @@ -1,3 +1 @@ include ':app' -include ':keyman-engine' -project(':keyman-engine').projectDir = new File(settingsDir, '../../KMEA/app') \ No newline at end of file