Skip to content
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

update project #7

Merged
merged 8 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'java-library'
id "org.openjfx.javafxplugin" version "0.0.10" apply false
id "org.openjfx.javafxplugin" version "0.1.0" apply false
}

if (System.getProperty('os.name').toLowerCase().contains("mac")) {
Expand All @@ -17,7 +17,7 @@ if (System.getProperty('os.name').toLowerCase().contains("mac")) {
ext.IOS_VERSION = ""
}

ext.libraryVersions = [attach: '4.0.14']
ext.libraryVersions = [attach: '4.0.20']

subprojects {
apply plugin: "org.openjfx.javafxplugin"
Expand Down
4 changes: 1 addition & 3 deletions gradle/android_project/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@ buildscript {
repositories {
mavenCentral()
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0-alpha09'
classpath 'com.android.tools.build:gradle:8.1.1'
jperedadnr marked this conversation as resolved.
Show resolved Hide resolved
}
}

allprojects {
repositories {
google()
mavenCentral()
jcenter()
}
}
2 changes: 1 addition & 1 deletion gradle/android_project/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
android.useAndroidX=true
org.gradle.daemon=false
org.gradle.jvmargs=-Xms512M -Xmx4g -XX:MaxPermSize=1024m -XX:MaxMetaspaceSize=1g
org.gradle.jvmargs=-Xms512M -Xmx4g -XX:MaxMetaspaceSize=1g
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
jperedadnr marked this conversation as resolved.
Show resolved Hide resolved
12 changes: 8 additions & 4 deletions gradle/android_project/library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 29

namespace 'com.gluonhq.helloandroid'

compileSdkVersion 33

defaultConfig {
minSdkVersion 21
targetSdkVersion 29
targetSdkVersion 33
}

dependencies {
compileOnly fileTree(dir: '../libs', include: '*.jar')
}

afterEvaluate {
generateDebugBuildConfig.enabled = false
buildFeatures {
buildConfig = false
resValues = false
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding="utf-8"?>
<manifest xmlns:android='http://schemas.android.com/apk/res/android' xmlns:tools="http://schemas.android.com/tools" package='com.gluonhq.helloandroid'>
<manifest xmlns:android='http://schemas.android.com/apk/res/android' xmlns:tools="http://schemas.android.com/tools">
<uses-sdk android:minSdkVersion="21" />
</manifest>

20 changes: 12 additions & 8 deletions gradle/native-build.gradle
jperedadnr marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ ext.aarBuild = { buildDir, projectDir, name, os ->
if (sdk == null) {
throw new GradleException("Error: ANDROID_SDK can't be null")
}
def androidJar = sdk + "/platforms/android-29/android.jar"
def androidJar = sdk + "/platforms/android-33/android.jar"
jperedadnr marked this conversation as resolved.
Show resolved Hide resolved
if (!file(androidJar).exists()) {
throw new GradleException("Error: path for ${androidJar} doesn't exist")
}
Expand Down Expand Up @@ -277,19 +277,20 @@ ext.nativeBuildLib = { buildDir, projectDir, name, os ->
println "Skipping native-build on iOS: path for ${platform} doesn't exist"
return
}

osSources = "$projectDir/src/main/native/$os/${name}.m"


File nativeSourcesDir = file("$projectDir/src/main/native/$os/")
osSources = [nativeSourcesDir.listFiles().findAll {it.name.endsWith(".m")}].flatten()

def compileOutput = "$buildDir/native/ios/$arch"
new File(compileOutput).mkdirs()
def compileOutputs = ["$buildDir/native/ios/$arch/${name}.o"]
def linkerOutput = "$buildDir/native/ios/$arch/lib${name}.a"

File outputDir = new File(compileOutput)
outputDir.mkdirs()

def clangArgs = [
"-xobjective-c",
"-mios-version-min=11.0",
includeFlags,
osIncludeFlags,
"-fobjc-arc",
"-c",
"-fPIC",
"-arch", arch,
Expand All @@ -303,6 +304,9 @@ ext.nativeBuildLib = { buildDir, projectDir, name, os ->
workingDir compileOutput
}

def compileOutputs = [outputDir.listFiles().findAll {it.name.endsWith(".o")}].flatten()
def linkerOutput = "$buildDir/native/ios/$arch/lib${name}.a"

def linkerArgs = [
"-static",
"-framework", "Foundation",
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
jperedadnr marked this conversation as resolved.
Show resolved Hide resolved
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading