Skip to content

Commit e4febed

Browse files
committed
fix: add shims for Caffeine UnsafeAccess
Backed by our own AndroidUnsafe Signed-off-by: Akash Yadav <akashyadav@appdevforall.org>
1 parent 788e3c5 commit e4febed

13 files changed

+224
-12
lines changed

patches/0001-fix-use-application-class-loader-to-find-jrt-file-sy.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From e571c9c18c355383a36012601b86dd8a0bd32959 Mon Sep 17 00:00:00 2001
22
From: Akash Yadav <contact@itsaky.com>
33
Date: Wed, 11 Mar 2026 16:39:54 +0530
4-
Subject: [PATCH 01/12] fix: use application class loader to find jrt:/ file
4+
Subject: [PATCH 01/13] fix: use application class loader to find jrt:/ file
55
system
66

77
The JRT file system is not available on Android. It needs to be part of the application. To ensure Kotlin's CoreJrtFileSystem can find that file system, we need to make it use the application class loader so that it finds the jrt:/ file system in the application's classes, not in the system's loader

patches/0002-fix-replace-usage-of-JavaVersion.current-with-androi.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From 2dc80f890f351be62507dda6217bfb5ff3d402c7 Mon Sep 17 00:00:00 2001
22
From: Akash Yadav <contact@itsaky.com>
33
Date: Wed, 11 Mar 2026 16:41:22 +0530
4-
Subject: [PATCH 02/12] fix: replace usage of JavaVersion.current() with
4+
Subject: [PATCH 02/13] fix: replace usage of JavaVersion.current() with
55
androidJavaVersion()
66

77
JavaVersion.current() tries to use system properties like 'java.version' and 'java.runtime.version'

patches/0003-fix-relocate-javax.annotation-in-embeddable-JARs.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From 31726352002706034f43e21d807774bd48d38511 Mon Sep 17 00:00:00 2001
22
From: Akash Yadav <contact@itsaky.com>
33
Date: Wed, 11 Mar 2026 16:44:52 +0530
4-
Subject: [PATCH 03/12] fix: relocate javax.annotation in embeddable JARs
4+
Subject: [PATCH 03/13] fix: relocate javax.annotation in embeddable JARs
55

66
Classes from the javax.annotation package cause duplicate class errors in Android projects.
77

patches/0004-feat-add-analysis-api-standalone-embeddable-for-ide-.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From 6c16fb3d36855b3499ab858379bade4a755c0c91 Mon Sep 17 00:00:00 2001
22
From: Akash Yadav <contact@itsaky.com>
33
Date: Fri, 13 Mar 2026 19:14:18 +0530
4-
Subject: [PATCH 04/12] feat: add analysis-api-standalone-embeddable-for-ide
4+
Subject: [PATCH 04/13] feat: add analysis-api-standalone-embeddable-for-ide
55
module
66

77
Signed-off-by: Akash Yadav <contact@itsaky.com>

patches/0005-fix-use-SwingUtilities-shim-directly-to-check-for-ap.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From 7084d7c52a41a8262938fde3922d36433b7b6f88 Mon Sep 17 00:00:00 2001
22
From: Akash Yadav <contact@itsaky.com>
33
Date: Fri, 13 Mar 2026 19:15:23 +0530
4-
Subject: [PATCH 05/12] fix: use SwingUtilities (shim) directly to check for
4+
Subject: [PATCH 05/13] fix: use SwingUtilities (shim) directly to check for
55
application thread
66

77
Signed-off-by: Akash Yadav <contact@itsaky.com>

patches/0006-fix-add-ability-to-provide-custom-CompilerConfigurat.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From 044d6b2568cb6ce1b432ad68307077296b82e0db Mon Sep 17 00:00:00 2001
22
From: Akash Yadav <contact@itsaky.com>
33
Date: Fri, 13 Mar 2026 19:16:19 +0530
4-
Subject: [PATCH 06/12] fix: add ability to provide custom
4+
Subject: [PATCH 06/13] fix: add ability to provide custom
55
CompilerConfiguration to StandaloneAnalysisAPISession
66

77
Signed-off-by: Akash Yadav <contact@itsaky.com>

patches/0007-fix-make-LLFlightRecorder-no-op.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From 797b38a8271a02f3656d60056bd80f79cc8b7798 Mon Sep 17 00:00:00 2001
22
From: Akash Yadav <akashyadav@appdevforall.org>
33
Date: Wed, 18 Mar 2026 21:44:04 +0530
4-
Subject: [PATCH 07/12] fix: make LLFlightRecorder no-op
4+
Subject: [PATCH 07/13] fix: make LLFlightRecorder no-op
55

66
jdk.jfr is not available on Android.
77

patches/0008-feat-package-AndroidUnsafe-within-embeddable-jar.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From e20d9c3af823b10fe95dcf414e92c321bc9b330a Mon Sep 17 00:00:00 2001
22
From: Akash Yadav <akashyadav@appdevforall.org>
33
Date: Wed, 25 Mar 2026 17:25:33 +0530
4-
Subject: [PATCH 08/12] feat: package AndroidUnsafe within embeddable jar
4+
Subject: [PATCH 08/13] feat: package AndroidUnsafe within embeddable jar
55

66
This also ensures that the usages of Unsafe are already relocated in the JAR file, significantly reducing the build times of consuming projects.
77

patches/0009-feat-provide-shims-for-SwingUtilities.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From ad493d46660d463634cf5e088d3805cb60d43fbc Mon Sep 17 00:00:00 2001
22
From: Akash Yadav <akashyadav@appdevforall.org>
33
Date: Wed, 25 Mar 2026 18:33:05 +0530
4-
Subject: [PATCH 09/12] feat: provide shims for SwingUtilities
4+
Subject: [PATCH 09/13] feat: provide shims for SwingUtilities
55

66
Signed-off-by: Akash Yadav <akashyadav@appdevforall.org>
77
---

patches/0010-fix-add-missing-classes-from-trove4j.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From 7fe5a8092769a44e0e907ec791be4f1b178334ba Mon Sep 17 00:00:00 2001
22
From: Akash Yadav <akashyadav@appdevforall.org>
33
Date: Wed, 25 Mar 2026 19:10:14 +0530
4-
Subject: [PATCH 10/12] fix: add missing classes from trove4j
4+
Subject: [PATCH 10/13] fix: add missing classes from trove4j
55

66
Signed-off-by: Akash Yadav <akashyadav@appdevforall.org>
77
---

0 commit comments

Comments
 (0)