Skip to content

Commit

Permalink
build(deps): bump com.badlogicgames.gdx:gdx-jnigen from 2.4.0 to 2.5.1 (
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaiR authored Aug 8, 2024
1 parent ed6f092 commit 555b3d4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies {
implementation(gradleApi())
implementation(localGroovy())

implementation("com.badlogicgames.gdx:gdx-jnigen:2.4.0")
implementation("com.badlogicgames.gdx:gdx-jnigen:2.5.1")
implementation("org.reflections:reflections:0.10.2")
implementation("com.lordcodes.turtle:turtle:0.6.0")
implementation("fr.inria.gforge.spoon:spoon-core:10.3.0")
Expand Down
14 changes: 8 additions & 6 deletions buildSrc/src/main/groovy/tool/generator/GenerateLibs.groovy
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package tool.generator

import com.badlogic.gdx.jnigen.*
import com.badlogic.gdx.utils.Architecture
import com.badlogic.gdx.utils.Os
import groovy.transform.CompileStatic
import org.gradle.api.DefaultTask
import org.gradle.api.file.CopySpec
Expand Down Expand Up @@ -97,23 +99,23 @@ class GenerateLibs extends DefaultTask {
BuildTarget[] buildTargets = []

if (forWindows) {
def win64 = BuildTarget.newDefaultTarget(BuildTarget.TargetOs.Windows, true)
def win64 = BuildTarget.newDefaultTarget(Os.Windows, Architecture.Bitness._64)
addFreeTypeIfEnabled(win64)
buildTargets += win64
}

if (forLinux) {
def linux64 = BuildTarget.newDefaultTarget(BuildTarget.TargetOs.Linux, true)
def linux64 = BuildTarget.newDefaultTarget(Os.Linux, Architecture.Bitness._64)
addFreeTypeIfEnabled(linux64)
buildTargets += linux64
}

if (forMac) {
buildTargets += createMacTarget(false)
buildTargets += createMacTarget(Architecture.x86)
}

if (forMacArm64) {
buildTargets += createMacTarget(true)
buildTargets += createMacTarget(Architecture.ARM)
}

new AntScriptGenerator().generate(buildConfig, buildTargets)
Expand Down Expand Up @@ -152,9 +154,9 @@ class GenerateLibs extends DefaultTask {
}
}

BuildTarget createMacTarget(Boolean isArm) {
BuildTarget createMacTarget(Architecture arch) {
def minMacOsVersion = '10.15'
def macTarget = BuildTarget.newDefaultTarget(BuildTarget.TargetOs.MacOsX, true, isArm)
def macTarget = BuildTarget.newDefaultTarget(Os.MacOsX, Architecture.Bitness._64, arch)
macTarget.libName = "libimgui-java64.dylib" // Lib for arm64 will be named the same for consistency.
macTarget.cppFlags += ' -std=c++14'
macTarget.cppFlags = macTarget.cppFlags.replace('10.7', minMacOsVersion)
Expand Down

0 comments on commit 555b3d4

Please sign in to comment.