Skip to content

Commit

Permalink
m1 build
Browse files Browse the repository at this point in the history
  • Loading branch information
redrezo committed Jun 15, 2022
1 parent d9d908c commit 38a3130
Showing 1 changed file with 29 additions and 33 deletions.
62 changes: 29 additions & 33 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,41 79,37 @@ def getJava11() {

subprojects.each { subproject -> evaluationDependsOn( subproject.path ) }

task copyNatives(type: Copy) {

// driftfx
from "native-repo/org/eclipse/fx/drift/driftfx_release_windows/$Versioning.fullVersion/driftfx_release_windows-${Versioning.fullVersion}.dll"
from "native-repo/org/eclipse/fx/drift/driftfx_release_linux/$Versioning.fullVersion/driftfx_release_linux-${Versioning.fullVersion}.so"
from "native-repo/org/eclipse/fx/drift/driftfx_release_macos/$Versioning.fullVersion/driftfx_release_macos-${Versioning.fullVersion}.dylib"

from("native-repo/org/eclipse/fx/drift/driftfx_release_macos_aarch64/$Versioning.fullVersion/driftfx_release_macos-${Versioning.fullVersion}.dylib") {
rename { fileName ->
fileName.replaceAll("driftfx_release_macos-.*[.]dylib", "libdriftfx_aarch64.dylib")
}
}

// driftcpp
// from "native-repo/org/eclipse/fx/drift/driftcpp_release_windows/$Versioning.fullVersion/driftcpp_release_windows-${Versioning.fullVersion}.dll"
// from "native-repo/org/eclipse/fx/drift/driftcpp_release_linux/$Versioning.fullVersion/driftcpp_release_linux-${Versioning.fullVersion}.so"
// from "native-repo/org/eclipse/fx/drift/driftcpp_release_macos/$Versioning.fullVersion/driftcpp_release_macos-${Versioning.fullVersion}.dylib"


into 'org.eclipse.fx.drift/src/main/resources/native'

rename { fileName ->
fileName
.replaceAll("driftfx_release_windows-.*[.]dll", "driftfx.dll")
.replaceAll("driftfx_release_linux-.*[.]so", "libdriftfx.so")
.replaceAll("driftfx_release_macos-.*[.]dylib", "libdriftfx.dylib")
task copyNativesMacosAarch64(type: Copy) {
from "native-repo/org/eclipse/fx/drift/driftfx_release_macos_aarch64/$Versioning.fullVersion/driftfx_release_macos-${Versioning.fullVersion}.dylib"
into 'org.eclipse.fx.drift/src/main/resources/native'
rename { fileName -> fileName.replaceAll("driftfx_release_macos-.*[.]dylib", "libdriftfx_aarch64.dylib") }
}
task copyNativesMacos(type: Copy) {
from "native-repo/org/eclipse/fx/drift/driftfx_release_macos/$Versioning.fullVersion/driftfx_release_macos-${Versioning.fullVersion}.dylib"
into 'org.eclipse.fx.drift/src/main/resources/native'
rename { fileName -> fileName.replaceAll("driftfx_release_macos-.*[.]dylib", "libdriftfx.dylib") }
}
task copyNativesWindows(type: Copy) {
from "native-repo/org/eclipse/fx/drift/driftfx_release_windows/$Versioning.fullVersion/driftfx_release_windows-${Versioning.fullVersion}.dll"
into 'org.eclipse.fx.drift/src/main/resources/native'
rename { fileName -> fileName.replaceAll("driftfx_release_windows-.*[.]dll", "driftfx.dll") }
}
task copyNativesLinux(type: Copy) {
from "native-repo/org/eclipse/fx/drift/driftfx_release_linux/$Versioning.fullVersion/driftfx_release_linux-${Versioning.fullVersion}.so"
into 'org.eclipse.fx.drift/src/main/resources/native'
rename { fileName -> fileName.replaceAll("driftfx_release_linux-.*[.]so", "libdriftfx.so") }
}

// .replaceAll("driftcpp_release_windows-.*[.]dll", "driftcpp.dll")
// .replaceAll("driftcpp_release_linux-.*[.]so", "libdriftcpp.so")
// .replaceAll("driftcpp_release_macos-.*[.]dylib", "libdriftcpp.dylib")
}

task copyNatives {
group = "DriftFX"
description = "Copies the available natives from ./native-repo to ./org.eclipse.fx.drift/src/main/resources/native/"
dependsOn = [
copyNativesMacosAarch64,
copyNativesMacos,
copyNativesWindows,
copyNativesLinux
]
}
copyNatives.group = "DriftFX"
copyNatives.description = "Copies the available natives from ./native-repo to ./org.eclipse.fx.drift/src/main/resources/native/"


task buildMultireleaseJar(type: Jar, dependsOn: [
Expand Down

0 comments on commit 38a3130

Please sign in to comment.