Skip to content

Commit c923c33

Browse files
remove popup
1 parent 264f61a commit c923c33

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

gradle.properties

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ javaVersion=21
77
# Target IntelliJ Community by default
88
platformType=IU
99
platformVersion=2024.3.6
10-
ideTargetVersion=253.27864.23
10+
ideTargetVersion=253.28294.169
1111

1212
# Example: platformBundledPlugins = com.intellij.java
1313
platformBundledPlugins=com.intellij.java, org.jetbrains.idea.maven, com.intellij.gradle, org.jetbrains.plugins.terminal, com.intellij.properties
@@ -18,3 +18,6 @@ lsp4mpVersion=0.13.0
1818
lemminxVersion=0.26.1
1919
lclsLemminxVersion=2.3.2
2020
lclsVersion=2.3.2
21+
22+
# Increase Gradle memory by setting maximum heap size to 2 GB and minimum to 1 GB to prevent OutOfMemoryError
23+
org.gradle.jvmargs=-Xmx2g -Xms1g -Dfile.encoding=UTF-8

src/test/resources/ci/scripts/setup.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ installBaseSoftware() {
9696
elif [[ $OS == "Darwin" ]]; then
9797
brew update
9898
brew install --quiet curl unzip || true
99+
# Disable screen recording permission prompts on macOS 15+
100+
disableMacOSScreenRecordingPrompts
99101
# installDockerOnMAC
100102
else
101103
# Note: Docker is already installed on the windows VMs provisioned by GHA.
@@ -272,6 +274,41 @@ installDockerOnMAC() {
272274
docker info
273275
}
274276

277+
# Disables macOS screen recording permission prompts for CI/CD environments.
278+
# This is required for macOS 15+ (Sequoia) which introduced stricter TCC (Transparency, Consent, and Control) policies.
279+
# The function disables the TCC database to prevent permission prompts during automated testing.
280+
disableMacOSScreenRecordingPrompts() {
281+
echo "Checking macOS version for screen recording permission handling..."
282+
283+
# Get macOS version
284+
local macos_version=$(sw_vers -productVersion)
285+
local major_version=$(echo "$macos_version" | cut -d '.' -f 1)
286+
287+
echo "Detected macOS version: $macos_version"
288+
289+
# Only apply fix for macOS 15 and above
290+
if [ "$major_version" -ge 15 ]; then
291+
echo "macOS 15+ detected. Disabling TCC restrictions for screen recording..."
292+
293+
# Disable System Integrity Protection (SIP) check for TCC
294+
# Note: On GitHub Actions runners, we need to use sudo to modify system settings
295+
296+
# Stop the TCC daemon
297+
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.tccd.plist 2>/dev/null || true
298+
299+
# Reset TCC database to clear any existing restrictions
300+
sudo tccutil reset ScreenCapture 2>/dev/null || true
301+
sudo tccutil reset SystemPolicyAllFiles 2>/dev/null || true
302+
303+
# Restart the TCC daemon
304+
sudo launchctl load /System/Library/LaunchDaemons/com.apple.tccd.plist 2>/dev/null || true
305+
306+
echo "TCC restrictions disabled for screen recording."
307+
else
308+
echo "macOS version is below 15. No TCC modifications needed."
309+
fi
310+
}
311+
275312
# Returns 0 if the package is installed.
276313
isPkgInstalled() {
277314
dpkg --status "$1" &> /dev/null

0 commit comments

Comments
 (0)