Skip to content

Commit 3de7026

Browse files
NmurtasDevclaude
andcommitted
Fix build and improve multi-platform support
- Upgrade launch4j plugin from 1.7.25 to 2.5.1 for Java 21 compatibility - Fix ExceptionInInitializerError with Java modules - Add default Maven properties for bundled.jre.path and exe.suffix - Fix deprecated URL constructor, use URI.create().toURL() - Add professional badges to README (CI/CD, CodeQL, License, Java, Platform, Version) - Improve Windows EXE build configuration with correct XML schema 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent cffa0ba commit 3de7026

3 files changed

Lines changed: 40 additions & 16 deletions

File tree

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Android Emulator Manager
22

3+
[![Java CI with Maven](https://github.com/NmurtasDev/AndroidEmulatorManager/actions/workflows/maven.yml/badge.svg)](https://github.com/NmurtasDev/AndroidEmulatorManager/actions/workflows/maven.yml)
4+
[![CodeQL](https://github.com/NmurtasDev/AndroidEmulatorManager/actions/workflows/codeql.yml/badge.svg)](https://github.com/NmurtasDev/AndroidEmulatorManager/actions/workflows/codeql.yml)
5+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6+
[![Java Version](https://img.shields.io/badge/Java-21-blue.svg)](https://www.oracle.com/java/technologies/javase/jdk21-archive-downloads.html)
7+
[![Platform](https://img.shields.io/badge/Platform-Windows%20%7C%20Linux%20%7C%20macOS-lightgrey.svg)](https://github.com/NmurtasDev/AndroidEmulatorManager)
8+
[![Version](https://img.shields.io/badge/version-3.0.0--SNAPSHOT-orange.svg)](https://github.com/NmurtasDev/AndroidEmulatorManager/releases)
9+
310
A modern **Java-based GUI tool** to download, install, and manage Android SDK and emulators.
411

512
## Features

pom.xml

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@
3939
<junit.version>5.10.1</junit.version>
4040
<slf4j.version>2.0.9</slf4j.version>
4141
<logback.version>1.5.19</logback.version>
42+
43+
<!-- Launch4j default properties -->
44+
<bundled.jre.path></bundled.jre.path>
45+
<exe.suffix></exe.suffix>
4246
</properties>
4347

4448
<dependencies>
@@ -116,30 +120,42 @@
116120
<plugin>
117121
<groupId>com.akathist.maven.plugins.launch4j</groupId>
118122
<artifactId>launch4j-maven-plugin</artifactId>
119-
<version>1.7.25</version>
123+
<version>2.5.1</version>
120124
<executions>
121125
<execution>
122126
<id>launch4j-exe</id>
123127
<phase>package</phase>
124128
<goals>
125129
<goal>launch4j</goal>
126130
</goals>
131+
<configuration>
132+
<headerType>gui</headerType>
133+
<outfile>${project.build.directory}/${project.artifactId}-${project.version}${exe.suffix}.exe</outfile>
134+
<jar>${project.build.directory}/${project.artifactId}-${project.version}-jar-with-dependencies.jar</jar>
135+
<errTitle>Android Emulator Manager</errTitle>
136+
<classPath>
137+
<mainClass>net.nicolamurtas.android.emulator.AndroidEmulatorManager</mainClass>
138+
</classPath>
139+
<jre>
140+
<path>${bundled.jre.path}</path>
141+
<minVersion>21</minVersion>
142+
<requires64Bit>true</requires64Bit>
143+
<bundledJre64Bit>true</bundledJre64Bit>
144+
</jre>
145+
<versionInfo>
146+
<fileVersion>3.0.0.0</fileVersion>
147+
<txtFileVersion>3.0.0-SNAPSHOT</txtFileVersion>
148+
<fileDescription>Android Emulator Manager</fileDescription>
149+
<copyright>MIT License - Nicola Murtas</copyright>
150+
<productVersion>3.0.0.0</productVersion>
151+
<txtProductVersion>3.0.0-SNAPSHOT</txtProductVersion>
152+
<productName>Android Emulator Manager</productName>
153+
<internalName>android-emulator-manager</internalName>
154+
<originalFilename>android-emulator-manager.exe</originalFilename>
155+
</versionInfo>
156+
</configuration>
127157
</execution>
128158
</executions>
129-
<configuration>
130-
<outfile>${project.build.directory}/${project.artifactId}-${project.version}${exe.suffix}.exe</outfile>
131-
<jar>${project.build.directory}/${project.artifactId}-${project.version}-jar-with-dependencies.jar</jar>
132-
<mainClass>net.nicolamurtas.android.emulator.AndroidEmulatorManager</mainClass>
133-
<errTitle>Android Emulator Manager</errTitle>
134-
<chdir>.</chdir>
135-
<priority>normal</priority>
136-
<stayAlive>false</stayAlive>
137-
<restartOnCrash>false</restartOnCrash>
138-
<minVersion>21</minVersion>
139-
<bundledJrePath>${bundled.jre.path}</bundledJrePath>
140-
<bundledJre64Bit>true</bundledJre64Bit>
141-
<requires64Bit>true</requires64Bit>
142-
</configuration>
143159
</plugin>
144160
</plugins>
145161
</build>

src/main/java/net/nicolamurtas/android/emulator/service/SdkDownloadService.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import org.slf4j.LoggerFactory;
77

88
import java.io.*;
9+
import java.net.URI;
910
import java.net.URL;
1011
import java.nio.file.Files;
1112
import java.nio.file.Path;
@@ -126,7 +127,7 @@ public void downloadAndInstallSdk(Path sdkPath, List<String> components, BiConsu
126127
*/
127128
private void downloadFile(String urlString, Path outputPath,
128129
BiConsumer<Integer, String> progressCallback) throws IOException {
129-
URL url = new URL(urlString);
130+
URL url = URI.create(urlString).toURL();
130131

131132
try (InputStream in = url.openStream();
132133
FileOutputStream out = new FileOutputStream(outputPath.toFile())) {

0 commit comments

Comments
 (0)