Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ on:

jobs:
android:
runs-on: macos-13
runs-on: macos-26
name: Android
env:
SDK_VERSION: 13.0.0.GA
SDK_VERSION: 13.2.0.GA
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v5
with:
java-version: '22'
distribution: 'temurin'
Expand All @@ -34,12 +34,12 @@ jobs:
echo "packageVersion=${PACKAGE_VERSION}" >> $GITHUB_ENV

- name: Use Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: '22.x'

- name: Cache Gradle packages
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: |
~/.gradle/caches
Expand All @@ -53,7 +53,7 @@ jobs:

- name: Cache SDK
id: titanium-cache
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: ~/.titanium/mobilesdk/linux/${{ env.SDK_VERSION }}
key: ${{ runner.os }}-titanium-sdk-${{ env.SDK_VERSION }}
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
ti build -p android --build-only

- name: Archive Android zip
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: hyperloop-android-${{ env.packageVersion }}
if-no-files-found: error
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ on:

jobs:
ios:
runs-on: macos-13
runs-on: macos-26
name: iOS
env:
SDK_VERSION: 13.0.0.GA
SDK_VERSION: 13.2.0.GA
# This one uses Swift 3.8.1. If you're running into the "Unsupported Swift architecture", verify which
# Swift version is used for the specified Ti SDK version, e.g. by looking into:
# ~/Library/Application Support/Titanium/mobilesdk/osx/<version>/iphone/Frameworks/TitaniumKit.xcframework/ios-arm64/TitaniumKit.framework/Headers/TitaniumKit-Swift.h
#
# An overview of macOS <> Xcode <> Swift versions can be found here: https://developer.apple.com/support/xcode/
DEVELOPER_DIR: /Applications/Xcode_14.3.1.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_26.2.app/Contents/Developer

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Align with latest Xcode version available on the macos-26 runner

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

won't we get Unsupported Swift architecture errors when I raise this version here (Swift 6.3) and the SDK still has Xcode 26.2 (Swift 6.2.3)? But we can change this once we update the iOS version of Hyperloop. As there are only changes for Android we don't need to release a new iOS version.

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- name: Display Swift Version
run: swift --version
Expand All @@ -38,7 +38,7 @@ jobs:
run: xcodebuild -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 12' -scheme hyperloop -target Tests -configuration Debug GCC_PREPROCESSOR_DEFINITIONS='USE_JSCORE_FRAMEWORK=1' test | xcpretty -r junit

- name: Use Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v6
with:
node-version: '22.x'

Expand All @@ -64,7 +64,7 @@ jobs:

- name: Cache SDK
id: titanium-cache
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: ~/Library/Application Support/Titanium/mobilesdk/osx/${{ env.SDK_VERSION }}
key: ${{ runner.os }}-titanium-sdk-${{ env.SDK_VERSION }}
Expand All @@ -83,7 +83,7 @@ jobs:
ti build -p ios --build-only

- name: Archive iOS artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: hyperloop-iphone-${{ env.packageVersion }}
if-no-files-found: error
Expand Down
53 changes: 42 additions & 11 deletions android/hooks/build.gradle.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ repositories {
// Android build settings for this library project.
android {
namespace '<%- moduleId %>'
compileSdkVersion <%- compileSdkVersion %>
compileSdk <%- compileSdkVersion %>
defaultConfig {
minSdkVersion <%- minSdkVersion %>
targetSdkVersion <%- targetSdkVersion %>
minSdk <%- minSdkVersion %>
targetSdk <%- targetSdkVersion %>
}
lintOptions {
lint {
checkReleaseBuilds false
}
}
Expand Down Expand Up @@ -53,19 +53,50 @@ task generateJarDependenciesFile() {

// Add the main Android framework JAR to the collection.
jarPathCollection.add(
file("${android.sdkDirectory}/platforms/${android.compileSdkVersion}/android.jar").toString())
file('<%- sdkDir %>/platforms/android-<%- compileSdkVersion %>/android.jar').toString())

// Fetch JAR paths to all dependencies referenced by this gradle script and "./platform/android/build.gradle".
project.android.libraryVariants.all { variant ->
variant.getCompileClasspath(null).each {
def fileObject = it
def filePath = fileObject.toString()
if (!filePath.startsWith(buildDir.toString()) && fileObject.exists()) {
jarPathCollection.add(filePath)
// Note: The generic "compileClasspath" configuration was removed in AGP 8+ for library projects.
// Use variant-specific compile classpath configurations instead.
def variantCompileConfigs = ['debugCompileClasspath', 'releaseCompileClasspath']
variantCompileConfigs.each { configName ->
def config = configurations.findByName(configName)
if (config != null) {
config.files.each { fileObject ->
def filePath = fileObject.toString()
if (!filePath.startsWith(buildDir.toString()) && fileObject.exists()) {
jarPathCollection.add(filePath)
}
}
}
}

// Extract classes.jar from AAR files so the metabase generator (BCEL) can load them.
// BCEL requires .jar files on the classpath; it cannot read .aar files directly.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, we should consider discontinuing manual .aar support - it's a supply-chain risk as well.

def extractedAarDir = file("${buildDir}/hyperloop/extracted-aars")
extractedAarDir.mkdirs()
def aarPaths = jarPathCollection.findAll { it.endsWith('.aar') }
aarPaths.each { aarPath ->
def aarFile = file(aarPath)
def extractedFile = file("${extractedAarDir}/${aarFile.name}.jar")
if (!extractedFile.exists() || extractedFile.lastModified() < aarFile.lastModified()) {
try {
def zip = new java.util.zip.ZipFile(aarFile)
def entry = zip.getEntry('classes.jar')
if (entry != null) {
extractedFile.bytes = zip.getInputStream(entry).bytes
}
zip.close()
} catch (Exception e) {
// Log but continue if AAR extraction fails
println "Warning: Failed to extract classes.jar from ${aarFile.name}: ${e.message}"
}
}
if (extractedFile.exists()) {
jarPathCollection.add(extractedFile.toString())
}
}

// Write the paths to all JAR file dependencies to text file, separated by newlines.
def outputFile = file("${buildDir}/outputs/hyperloop/jar-dependencies.txt")
outputFile.getParentFile().mkdirs()
Expand Down
1 change: 1 addition & 0 deletions android/hooks/hyperloop.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ exports.cliVersion = '>=3.2';
compileSdkVersion: this.builder.targetSDK,
moduleId: this.builder.moduleId,
minSdkVersion: this.builder.minSDK,
sdkDir: this.builder.androidInfo.sdk.path.replace(/\\/g, '\\\\'),
targetSdkVersion: this.builder.targetSDK,
tiMavenUrl: encodeURI('file://' + path.join(this.builder.platformPath, 'm2repository').replace(/\\/g, '/')),
tiProjectPlatformAndroidDir: path.join(this.builder.projectDir, 'platform', 'android'),
Expand Down
Binary file removed android/hooks/metabase/lib/commons-lang3-3.19.0.jar
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion android/hooks/metabase/metabase.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function generate(classPath, opts, callback) {
classPath = typeof(classPath)==='string' ? [classPath] : classPath;

var dest = opts.dest || opts.cacheDir || 'build',
cp = [path.join(__dirname, 'lib', 'bcel-6.11.0.jar'), path.join(__dirname, 'lib', 'commons-lang3-3.19.0.jar'), path.join(__dirname, 'lib', 'commons-io-2.20.0.jar'), path.join(__dirname, 'lib', 'json.jar'), dest];
cp = [path.join(__dirname, 'lib', 'bcel-6.11.0.jar'), path.join(__dirname, 'lib', 'commons-lang3-3.20.0.jar'), path.join(__dirname, 'lib', 'commons-io-2.20.0.jar'), path.join(__dirname, 'lib', 'json.jar'), dest];

compileIfNecessary(dest, cp.join(path.delimiter), function(err){
if (err) return callback(err);
Expand Down
2 changes: 1 addition & 1 deletion android/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ name: hyperloop-android
moduleid: hyperloop
guid: bdaca69f-b316-4ce6-9065-7a61e1dafa39
platform: android
minsdk: 13.0.0
minsdk: 13.2.0
Loading
Loading