-
-
Notifications
You must be signed in to change notification settings - Fork 7
fix for gradle tools 9 #420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
m1ga
wants to merge
9
commits into
master
Choose a base branch
from
gradle9Fixes
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
3add86e
fix for gradle tools 9
m1ga 32c2110
workflow
m1ga 04be917
Merge branch 'master' into gradle9Fixes
m1ga 9972921
xcode version
m1ga fcadfc5
upgrade minsdk
m1ga 48df824
fix external modules
m1ga fcd6970
npm updates
m1ga ace4ca8
load correct commons-lang
m1ga ca804cb
upgrade versions
m1ga File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
| } | ||
| } | ||
|
|
@@ -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. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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() | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again: https://github.com/tidev/titanium-sdk/blob/main/.github/workflows/build.yml#L64
There was a problem hiding this comment.
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 architectureerrors 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.