Repository: xmake-io/xmake-gradle
Pull request #24: upgrade gradle and agp
Author: login: kekopom
Created: 2025-05-09T19:25:08Z | Merged: 2025-05-11T12:54:50Z

motivation: new versions of Android-Studio don't support anymore old version of gradle + agp

- upgrade gradle by running `gradle wrapper --gradle-version 8.14`
- upgrade agp to latest (must be at least 8.9.x with gradle 8.14)
- move jni folder to src/main/cpp (default location when running "Adding c++ to module" from Android-Studio
- upgrade the minSdk, targetSdk..
- Plugin generates libs in src/main/jniLibs (default location for Android Studio to embedd them into APK)
- Added x86 and x86_64 ABI in app/ for Emulator

Remaining runtime issue: I got `java.lang.UnsatisfiedLinkError: dlopen failed: library "libpng.so" not found: needed by ..... lib/x86_64/libnativelib.so .......`


Diff:
diff --git a/app/build.gradle b/app/build.gradle
index a971f19..856ca74 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,12 +1,12 @@
 apply plugin: 'com.android.application'
 
 android {
-    compileSdkVersion 29
-    buildToolsVersion "30.0.2"
+    namespace "org.tboox.xmake"
+    compileSdkVersion 36
     defaultConfig {
         applicationId "org.tboox.xmake"
-        minSdkVersion 15
-        targetSdkVersion 29
+        minSdkVersion 30
+        targetSdkVersion 36
         versionCode 1
         versionName "1.0"
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -20,6 +20,12 @@ android {
     }
 }
 
+java {
+    toolchain {
+        languageVersion = JavaLanguageVersion.of(17)
+    }
+}
+
 dependencies {
     implementation fileTree(dir: 'libs', include: ['*.jar'])
     implementation 'androidx.appcompat:appcompat:1.0.2'
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index a206c30..6c9f5eb 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="org.tboox.xmake" >
+<manifest xmlns:android="http://schemas.android.com/apk/res/android">
 
     <application
         android:allowBackup="true"
@@ -9,7 +8,8 @@
         android:roundIcon="@mipmap/ic_launcher_round"
         android:supportsRtl="true"
         android:theme="@style/AppTheme" >
-        <activity android:name=".MainActivity" >
+        <activity android:name=".MainActivity"
+            android:exported="true">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
 
diff --git a/build.gradle b/build.gradle
index d242673..33b54ee 100644
--- a/build.gradle
+++ b/build.gradle
@@ -7,7 +7,7 @@ buildscript {
 
     }
     dependencies {
-        classpath "com.android.tools.build:gradle:4.0.0"
+        classpath 'com.android.tools.build:gradle:8.10.0'
         //classpath fileTree(dir: 'gradle-xmake-plugin/build/libs', include: ['*.jar'])
 
         // NOTE: Do not place your application dependencies here; they belong
@@ -19,10 +19,9 @@ allprojects {
     repositories {
         google()
         mavenCentral()
-
     }
 }
 
-task clean(type: Delete) {
-    delete rootProject.buildDir
+tasks.register('clean', Delete) {
+    delete rootProject.layout.buildDirectory
 }
diff --git a/gradle-xmake-plugin/build.gradle b/gradle-xmake-plugin/build.gradle
index d08f1ac..15966df 100644
--- a/gradle-xmake-plugin/build.gradle
+++ b/gradle-xmake-plugin/build.gradle
@@ -1,6 +1,6 @@
 plugins {
     // to publish the plugin at the gradle plugin portal
-    id "com.gradle.plugin-publish" version "0.11.0"
+    id "com.gradle.plugin-publish" version "1.3.1"
     // Apply the java-library plugin to add support for Java Library
     id 'java-gradle-plugin'
     id 'maven-publish'
@@ -21,31 +21,19 @@ dependencies {
     implementation gradleApi()
     // Use JUnit test framework
     testImplementation 'junit:junit:4.12'
-    compileOnly "com.android.tools.build:gradle:4.0.0"
+    compileOnly "com.android.tools.build:gradle:8.10.0"
 }
 
 gradlePlugin {
     plugins {
         xmakePlugin {
+            description = 'A gradle plugin that integrates xmake seamlessly'
+            displayName = 'Gradle XMake plugin'
             id = 'org.tboox.gradle-xmake-plugin'
             implementationClass = 'org.tboox.gradle.XMakePlugin'
+            tags = ['xmake', 'c++', 'lua']
+            vcsUrl = 'https://github.com/xmake-io/xmake-gradle'
+            website = 'https://github.com/xmake-io/xmake-gradle'
         }
     }
 }
-
-pluginBundle {
-    website = 'https://github.com/xmake-io/xmake-gradle'
-    vcsUrl = 'https://github.com/xmake-io/xmake-gradle'
-    description = 'A gradle plugin that integrates xmake seamlessly'
-    tags = ['xmake', 'c++', 'lua']
-
-    plugins {
-        xmakePlugin {
-            // id is captured from java-gradle-plugin configuration
-            displayName = 'Gradle XMake plugin'
-        }
-    }
-}
-
-sourceCompatibility = "8"
-targetCompatibility = "8"
diff --git a/gradle-xmake-plugin/src/main/groovy/org/tboox/gradle/XMakeBuildTask.groovy b/gradle-xmake-plugin/src/main/groovy/org/tboox/gradle/XMakeBuildTask.groovy
index b3691ca..5593ade 100644
--- a/gradle-xmake-plugin/src/main/groovy/org/tboox/gradle/XMakeBuildTask.groovy
+++ b/gradle-xmake-plugin/src/main/groovy/org/tboox/gradle/XMakeBuildTask.groovy
@@ -39,7 +39,7 @@ class XMakeBuildTask extends DefaultTask {
 
     // build command line
     private List<String> buildCmdLine() {
-        List<String> parameters = new ArrayList<>();
+        List<String> parameters = new ArrayList<>()
         parameters.add(taskContext.program)
         parameters.add("build")
         switch (taskContext.logLevel) {
@@ -58,12 +58,12 @@ class XMakeBuildTask extends DefaultTask {
                 parameters.add(target)
             }
         }
-        return parameters;
+        return parameters
     }
 
     // build install command line
     private List<String> buildInstallCmdLine() {
-        List<String> parameters = new ArrayList<>();
+        List<String> parameters = new ArrayList<>()
         parameters.add(taskContext.program)
         parameters.add("install")
         switch (taskContext.logLevel) {
@@ -77,7 +77,7 @@ class XMakeBuildTask extends DefaultTask {
                 parameters.add("-q")
                 break
         }
-        File libsDir = new File(taskContext.buildDirectory, String.join(File.separator, "libs", taskContext.buildArch))
+        File libsDir = new File(taskContext.buildDirectory, String.join(File.separator, "src", "main", "jniLibs", taskContext.buildArch))
         parameters.add("-o")
         parameters.add(libsDir.path)
         Set<String> targets = taskContext.targets
@@ -86,7 +86,7 @@ class XMakeBuildTask extends DefaultTask {
                 parameters.add(target)
             }
         }
-        return parameters;
+        return parameters
     }
 
     @TaskAction
diff --git a/gradle-xmake-plugin/src/main/groovy/org/tboox/gradle/XMakeCleanTask.groovy b/gradle-xmake-plugin/src/main/groovy/org/tboox/gradle/XMakeCleanTask.groovy
index e355b74..864d599 100644
--- a/gradle-xmake-plugin/src/main/groovy/org/tboox/gradle/XMakeCleanTask.groovy
+++ b/gradle-xmake-plugin/src/main/groovy/org/tboox/gradle/XMakeCleanTask.groovy
@@ -39,7 +39,7 @@ class XMakeCleanTask extends DefaultTask {
 
     // build command line
     private List<String> buildCmdLine() {
-        List<String> parameters = new ArrayList<>();
+        List<String> parameters = new ArrayList<>()
         parameters.add(taskContext.program)
         parameters.add("clean")
         switch (taskContext.logLevel) {
@@ -58,7 +58,7 @@ class XMakeCleanTask extends DefaultTask {
                 parameters.add(target)
             }
         }
-        return parameters;
+        return parameters
     }
 
     private void uninstallArtifacts() {
@@ -70,9 +70,9 @@ class XMakeCleanTask extends DefaultTask {
             out.write(text)
         }
 
-        List<String> parameters = new ArrayList<>();
+        List<String> parameters = new ArrayList<>()
         parameters.add(taskContext.program)
-        parameters.add("lua");
+        parameters.add("lua")
         switch (taskContext.logLevel) {
             case "verbose":
                 parameters.add("-v")
diff --git a/gradle-xmake-plugin/src/main/groovy/org/tboox/gradle/XMakeConfigureTask.groovy b/gradle-xmake-plugin/src/main/groovy/org/tboox/gradle/XMakeConfigureTask.groovy
index 65f9e42..28c26a7 100644
--- a/gradle-xmake-plugin/src/main/groovy/org/tboox/gradle/XMakeConfigureTask.groovy
+++ b/gradle-xmake-plugin/src/main/groovy/org/tboox/gradle/XMakeConfigureTask.groovy
@@ -39,7 +39,7 @@ class XMakeConfigureTask extends DefaultTask {
 
     // build command line
     private List<String> buildCmdLine() {
-        List<String> parameters = new ArrayList<>();
+        List<String> parameters = new ArrayList<>()
         parameters.add(taskContext.program)
         parameters.add("f")
         parameters.add("-c")
@@ -54,15 +54,15 @@ class XMakeConfigureTask extends DefaultTask {
             default:
                 break
         }
-        parameters.add("-p");
-        parameters.add("android");
+        parameters.add("-p")
+        parameters.add("android")
         if (taskContext.buildArch != null) {
-            parameters.add("-a");
-            parameters.add(taskContext.buildArch);
+            parameters.add("-a")
+            parameters.add(taskContext.buildArch)
         }
         if (taskContext.buildMode != null) {
-            parameters.add("-m");
-            parameters.add(taskContext.buildMode);
+            parameters.add("-m")
+            parameters.add(taskContext.buildMode)
         }
         List<String> arguments = taskContext.arguments
         if (arguments != null && arguments.size() > 0) {
@@ -114,7 +114,7 @@ class XMakeConfigureTask extends DefaultTask {
             }
         }
         parameters.add("--buildir=" + taskContext.buildDirectory.path)
-        return parameters;
+        return parameters
     }
 
     @TaskAction
diff --git a/gradle-xmake-plugin/src/main/groovy/org/tboox/gradle/XMakeInstallTask.groovy b/gradle-xmake-plugin/src/main/groovy/org/tboox/gradle/XMakeInstallTask.groovy
index 2b7b178..d2be01c 100644
--- a/gradle-xmake-plugin/src/main/groovy/org/tboox/gradle/XMakeInstallTask.groovy
+++ b/gradle-xmake-plugin/src/main/groovy/org/tboox/gradle/XMakeInstallTask.groovy
@@ -20,8 +20,6 @@
  */
 package org.tboox.gradle
 
-import com.android.build.gradle.AppExtension
-import com.android.build.gradle.LibraryExtension
 import org.gradle.api.DefaultTask
 import org.gradle.api.tasks.TaskAction
 import org.gradle.api.tasks.Internal
@@ -40,9 +38,9 @@ class XMakeInstallTask extends DefaultTask {
 
     // build command line
     private List<String> buildCmdLine(File installArtifactsScriptFile) {
-        List<String> parameters = new ArrayList<>();
+        List<String> parameters = new ArrayList<>()
         parameters.add(taskContext.program)
-        parameters.add("lua");
+        parameters.add("lua")
         switch (taskContext.logLevel) {
             case "verbose":
                 parameters.add("-v")
@@ -70,7 +68,7 @@ class XMakeInstallTask extends DefaultTask {
                 parameters.add(target)
             }
         }
-        return parameters;
+        return parameters
     }
 
     @TaskAction
@@ -94,36 +92,5 @@ class XMakeInstallTask extends DefaultTask {
         // do install
         XMakeExecutor executor = new XMakeExecutor(taskContext.logger, false)
         executor.exec(buildCmdLine(installArtifactsScriptFile), taskContext.projectDirectory)
-
-        /* add libs directory to sourceSets
-         *
-            sourceSets {
-                main {
-                    jniLibs.srcDirs = ["libs"]
-                }
-            }
-         */
-        def androidExtension = taskContext.project.getProperties().get("android")
-        if (androidExtension != null) {
-            if (androidExtension instanceof LibraryExtension) {
-                LibraryExtension libraryExtension = androidExtension
-                def sourceSets = libraryExtension.sourceSets
-                if (sourceSets != null) {
-                    def main = sourceSets.getByName("main")
-                    if (main != null && main.jniLibs != null && main.jniLibs.srcDirs != null) {
-                        main.jniLibs.srcDirs("libs")
-                    }
-                }
-            } else if (androidExtension instanceof AppExtension) {
-                AppExtension appExtension = androidExtension
-                def sourceSets = appExtension.sourceSets
-                if (sourceSets != null) {
-                    def main = sourceSets.getByName("main")
-                    if (main != null && main.jniLibs != null && main.jniLibs.srcDirs != null) {
-                        main.jniLibs.srcDirs("libs")
-                    }
-                }
-            }
-        }
     }
 }
diff --git a/gradle-xmake-plugin/src/main/groovy/org/tboox/gradle/XMakePlugin.groovy b/gradle-xmake-plugin/src/main/groovy/org/tboox/gradle/XMakePlugin.groovy
index 828052d..7d0bdb0 100644
--- a/gradle-xmake-plugin/src/main/groovy/org/tboox/gradle/XMakePlugin.groovy
+++ b/gradle-xmake-plugin/src/main/groovy/org/tboox/gradle/XMakePlugin.groovy
@@ -83,7 +83,7 @@ class XMakePlugin implements Plugin<Project> {
             registerXMakeCleanTasks(project, extension, logger)
 
             // register build task to the beginning of preBuild task
-            def preBuildTask = project.tasks.getByName("preBuild")
+            def preBuildTask = project.tasks.named("preBuild")
             if (preBuildTask != null) {
                 preBuildTask.configure { Task task ->
                     task.dependsOn("xmakeInstall")
@@ -91,7 +91,7 @@ class XMakePlugin implements Plugin<Project> {
             }
 
             // register clean task to the beginning of clean task
-            def cleanTask = project.tasks.getByName("clean")
+            def cleanTask = project.tasks.named("clean")
             if (cleanTask != null) {
                 cleanTask.configure { Task task ->
                     task.dependsOn("xmakeClean")
diff --git a/gradle-xmake-plugin/src/main/groovy/org/tboox/gradle/XMakeTaskContext.groovy b/gradle-xmake-plugin/src/main/groovy/org/tboox/gradle/XMakeTaskContext.groovy
index 8582ead..b1a762d 100644
--- a/gradle-xmake-plugin/src/main/groovy/org/tboox/gradle/XMakeTaskContext.groovy
+++ b/gradle-xmake-plugin/src/main/groovy/org/tboox/gradle/XMakeTaskContext.groovy
@@ -148,12 +148,12 @@ class XMakeTaskContext {
                 return new File(project.buildscript.sourceFile.parentFile, buildDir).absoluteFile
             }
         }
-        return new File(project.buildDir.absoluteFile, "xmake")
+        return new File(project.layout.buildDirectory.asFile.get().absoluteFile, "xmake")
     }
 
     // get native libs directory
     File getNativeLibsDir() {
-        return new File(project.buildscript.sourceFile.parentFile,"libs").absoluteFile
+        return new File(project.buildscript.sourceFile.parentFile, String.join(File.separator, "src", "main", "jniLibs")).absoluteFile
     }
 
     // get cflags
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index f6b961f..1b33c55 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 39d8715..ca025c8 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,7 +1,7 @@
-#Sun Apr 12 10:14:05 CST 2020
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
+networkTimeout=10000
+validateDistributionUrl=true
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-#distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
diff --git a/gradlew b/gradlew
index cccdd3d..23d15a9 100755
--- a/gradlew
+++ b/gradlew
@@ -1,78 +1,129 @@
-#!/usr/bin/env sh
+#!/bin/sh
+
+#
+# Copyright © 2015-2021 the original authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+#
 
 ##############################################################################
-##
-##  Gradle start up script for UN*X
-##
+#
+#   Gradle start up script for POSIX generated by Gradle.
+#
+#   Important for running:
+#
+#   (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
+#       noncompliant, but you have some other compliant shell such as ksh or
+#       bash, then to run this script, type that shell name before the whole
+#       command line, like:
+#
+#           ksh Gradle
+#
+#       Busybox and similar reduced shells will NOT work, because this script
+#       requires all of these POSIX shell features:
+#         * functions;
+#         * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
+#           «${var#prefix}», «${var%suffix}», and «$( cmd )»;
+#         * compound commands having a testable exit status, especially «case»;
+#         * various built-in commands including «command», «set», and «ulimit».
+#
+#   Important for patching:
+#
+#   (2) This script targets any POSIX shell, so it avoids extensions provided
+#       by Bash, Ksh, etc; in particular arrays are avoided.
+#
+#       The "traditional" practice of packing multiple parameters into a
+#       space-separated string is a well documented source of bugs and security
+#       problems, so this is (mostly) avoided, by progressively accumulating
+#       options in "$@", and eventually passing that to Java.
+#
+#       Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
+#       and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
+#       see the in-line comments for details.
+#
+#       There are tweaks for specific operating systems such as AIX, CygWin,
+#       Darwin, MinGW, and NonStop.
+#
+#   (3) This script is generated from the Groovy template
+#       https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+#       within the Gradle project.
+#
+#       You can find Gradle at https://github.com/gradle/gradle/.
+#
 ##############################################################################
 
 # Attempt to set APP_HOME
+
 # Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-        PRG="$link"
-    else
-        PRG=`dirname "$PRG"`"/$link"
-    fi
+app_path=$0
+
+# Need this for daisy-chained symlinks.
+while
+    APP_HOME=${app_path%"${app_path##*/}"}  # leaves a trailing /; empty if no leading path
+    [ -h "$app_path" ]
+do
+    ls=$( ls -ld "$app_path" )
+    link=${ls#*' -> '}
+    case $link in             #(
+      /*)   app_path=$link ;; #(
+      *)    app_path=$APP_HOME$link ;;
+    esac
 done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
 
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
+# This is normally unused
+# shellcheck disable=SC2034
+APP_BASE_NAME=${0##*/}
+# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
+APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
 
 # Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
+MAX_FD=maximum
 
 warn () {
     echo "$*"
-}
+} >&2
 
 die () {
     echo
     echo "$*"
     echo
     exit 1
-}
+} >&2
 
 # OS specific support (must be 'true' or 'false').
 cygwin=false
 msys=false
 darwin=false
 nonstop=false
-case "`uname`" in
-  CYGWIN* )
-    cygwin=true
-    ;;
-  Darwin* )
-    darwin=true
-    ;;
-  MINGW* )
-    msys=true
-    ;;
-  NONSTOP* )
-    nonstop=true
-    ;;
+case "$( uname )" in                #(
+  CYGWIN* )         cygwin=true  ;; #(
+  Darwin* )         darwin=true  ;; #(
+  MSYS* | MINGW* )  msys=true    ;; #(
+  NONSTOP* )        nonstop=true ;;
 esac
 
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+CLASSPATH="\\\"\\\""
+
 
 # Determine the Java command to use to start the JVM.
 if [ -n "$JAVA_HOME" ] ; then
     if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
         # IBM's JDK on AIX uses strange locations for the executables
-        JAVACMD="$JAVA_HOME/jre/sh/java"
+        JAVACMD=$JAVA_HOME/jre/sh/java
     else
-        JAVACMD="$JAVA_HOME/bin/java"
+        JAVACMD=$JAVA_HOME/bin/java
     fi
     if [ ! -x "$JAVACMD" ] ; then
         die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
@@ -81,92 +132,120 @@ Please set the JAVA_HOME variable in your environment to match the
 location of your Java installation."
     fi
 else
-    JAVACMD="java"
-    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+    JAVACMD=java
+    if ! command -v java >/dev/null 2>&1
+    then
+        die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
 
 Please set the JAVA_HOME variable in your environment to match the
 location of your Java installation."
+    fi
 fi
 
 # Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
-    MAX_FD_LIMIT=`ulimit -H -n`
-    if [ $? -eq 0 ] ; then
-        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
-            MAX_FD="$MAX_FD_LIMIT"
-        fi
-        ulimit -n $MAX_FD
-        if [ $? -ne 0 ] ; then
-            warn "Could not set maximum file descriptor limit: $MAX_FD"
-        fi
-    else
-        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
-    fi
+if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
+    case $MAX_FD in #(
+      max*)
+        # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
+        # shellcheck disable=SC2039,SC3045
+        MAX_FD=$( ulimit -H -n ) ||
+            warn "Could not query maximum file descriptor limit"
+    esac
+    case $MAX_FD in  #(
+      '' | soft) :;; #(
+      *)
+        # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
+        # shellcheck disable=SC2039,SC3045
+        ulimit -n "$MAX_FD" ||
+            warn "Could not set maximum file descriptor limit to $MAX_FD"
+    esac
 fi
 
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
-    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
+# Collect all arguments for the java command, stacking in reverse order:
+#   * args from the command line
+#   * the main class name
+#   * -classpath
+#   * -D...appname settings
+#   * --module-path (only if needed)
+#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if "$cygwin" || "$msys" ; then
+    APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
+    CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
+
+    JAVACMD=$( cygpath --unix "$JAVACMD" )
 
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
-    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
-    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-    JAVACMD=`cygpath --unix "$JAVACMD"`
-
-    # We build the pattern for arguments to be converted via cygpath
-    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
-    SEP=""
-    for dir in $ROOTDIRSRAW ; do
-        ROOTDIRS="$ROOTDIRS$SEP$dir"
-        SEP="|"
-    done
-    OURCYGPATTERN="(^($ROOTDIRS))"
-    # Add a user-defined pattern to the cygpath arguments
-    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
-        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
-    fi
     # Now convert the arguments - kludge to limit ourselves to /bin/sh
-    i=0
-    for arg in "$@" ; do
-        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
-        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
-
-        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
-            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
-        else
-            eval `echo args$i`="\"$arg\""
+    for arg do
+        if
+            case $arg in                                #(
+              -*)   false ;;                            # don't mess with options #(
+              /?*)  t=${arg#/} t=/${t%%/*}              # looks like a POSIX filepath
+                    [ -e "$t" ] ;;                      #(
+              *)    false ;;
+            esac
+        then
+            arg=$( cygpath --path --ignore --mixed "$arg" )
         fi
-        i=$((i+1))
+        # Roll the args list around exactly as many times as the number of
+        # args, so each arg winds up back in the position where it started, but
+        # possibly modified.
+        #
+        # NB: a `for` loop captures its iteration list before it begins, so
+        # changing the positional parameters here affects neither the number of
+        # iterations, nor the values presented in `arg`.
+        shift                   # remove old arg
+        set -- "$@" "$arg"      # push replacement arg
     done
-    case $i in
-        (0) set -- ;;
-        (1) set -- "$args0" ;;
-        (2) set -- "$args0" "$args1" ;;
-        (3) set -- "$args0" "$args1" "$args2" ;;
-        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
-        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
-        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
-        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
-        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
-        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
-    esac
 fi
 
-# Escape application args
-save () {
-    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
-    echo " "
-}
-APP_ARGS=$(save "$@")
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
 
-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
-  cd "$(dirname "$0")"
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Collect all arguments for the java command:
+#   * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
+#     and any embedded shellness will be escaped.
+#   * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
+#     treated as '${Hostname}' itself on the command line.
+
+set -- \
+        "-Dorg.gradle.appname=$APP_BASE_NAME" \
+        -classpath "$CLASSPATH" \
+        -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
+        "$@"
+
+# Stop when "xargs" is not available.
+if ! command -v xargs >/dev/null 2>&1
+then
+    die "xargs is not available"
 fi
 
+# Use "xargs" to parse quoted args.
+#
+# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
+#
+# In Bash we could simply go:
+#
+#   readarray ARGS < <( xargs -n1 <<<"$var" ) &&
+#   set -- "${ARGS[@]}" "$@"
+#
+# but POSIX shell has neither arrays nor command substitution, so instead we
+# post-process each arg (as a line of input to sed) to backslash-escape any
+# character that might be a shell metacharacter, then use eval to reverse
+# that process (while maintaining the separation between arguments), and wrap
+# the whole thing up as a single "set" statement.
+#
+# This will of course break if any of these variables contains a newline or
+# an unmatched quote.
+#
+
+eval "set -- $(
+        printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
+        xargs -n1 |
+        sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
+        tr '\n' ' '
+    )" '"$@"'
+
 exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
index e95643d..5eed7ee 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -1,4 +1,22 @@
-@if "%DEBUG%" == "" @echo off
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem      https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+@rem SPDX-License-Identifier: Apache-2.0
+@rem
+
+@if "%DEBUG%"=="" @echo off
 @rem ##########################################################################
 @rem
 @rem  Gradle startup script for Windows
@@ -9,25 +27,29 @@
 if "%OS%"=="Windows_NT" setlocal
 
 set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
+if "%DIRNAME%"=="" set DIRNAME=.
+@rem This is normally unused
 set APP_BASE_NAME=%~n0
 set APP_HOME=%DIRNAME%
 
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
 @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
 
 @rem Find java.exe
 if defined JAVA_HOME goto findJavaFromJavaHome
 
 set JAVA_EXE=java.exe
 %JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
+if %ERRORLEVEL% equ 0 goto execute
 
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
+echo. 1>&2
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
+echo. 1>&2
+echo Please set the JAVA_HOME variable in your environment to match the 1>&2
+echo location of your Java installation. 1>&2
 
 goto fail
 
@@ -35,48 +57,36 @@ goto fail
 set JAVA_HOME=%JAVA_HOME:"=%
 set JAVA_EXE=%JAVA_HOME%/bin/java.exe
 
-if exist "%JAVA_EXE%" goto init
+if exist "%JAVA_EXE%" goto execute
 
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
+echo. 1>&2
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
+echo. 1>&2
+echo Please set the JAVA_HOME variable in your environment to match the 1>&2
+echo location of your Java installation. 1>&2
 
 goto fail
 
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
 :execute
 @rem Setup the command line
 
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+set CLASSPATH=
+
 
 @rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
 
 :end
 @rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
+if %ERRORLEVEL% equ 0 goto mainEnd
 
 :fail
 rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
 rem the _cmd.exe /c_ return code!
-if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
+set EXIT_CODE=%ERRORLEVEL%
+if %EXIT_CODE% equ 0 set EXIT_CODE=1
+if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
+exit /b %EXIT_CODE%
 
 :mainEnd
 if "%OS%"=="Windows_NT" endlocal
diff --git a/nativelib/build.gradle b/nativelib/build.gradle
index 25eb082..360b10f 100644
--- a/nativelib/build.gradle
+++ b/nativelib/build.gradle
@@ -5,21 +5,18 @@ apply plugin: 'com.android.library'
 //apply plugin: "org.tboox.gradle-xmake-plugin"
 
 android {
-    compileSdkVersion 29
-    buildToolsVersion "30.0.2"
-
+    namespace "org.tboox.xmake.nativelib"
+    compileSdkVersion 36
 
     defaultConfig {
-        minSdkVersion 15
-        targetSdkVersion 29
-        versionCode 1
-        versionName "1.0"
+        minSdkVersion 30
+        targetSdkVersion 36
 
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
         consumerProguardFiles 'consumer-rules.pro'
 
         ndk {
-            abiFilters "armeabi-v7a", "arm64-v8a"
+            abiFilters "armeabi-v7a", "arm64-v8a", "x86_64", "x86"
         }
 
         externalNativeBuild {
@@ -27,13 +24,13 @@ android {
             /*
             cmake {
                 cppFlags "-DTEST"
-                abiFilters "armeabi-v7a", "arm64-v8a"
+                abiFilters "armeabi-v7a", "arm64-v8a", "x86_64"
             }*/
 
             /*
             xmake {
                 cppFlags "-DTEST", "-DTEST2"
-                abiFilters "armeabi-v7a", "arm64-v8a"
+                abiFilters "armeabi-v7a", "arm64-v8a", "x86_64"
             }*/
         }
     }
@@ -48,14 +45,14 @@ android {
 
         /*
         cmake {
-            version "3.17.3"
-            path "jni/CMakeLists.txt"
+            version "3.22.1"
+            path "src/main/cpp/CMakeLists.txt"
         }*/
 
         /*
         xmake {
             logLevel "verbose"
-            path "jni/xmake.lua"
+            path "src/main/cpp/xmake.lua"
             buildMode "debug"
             //arguments "--test=y"
             //program /usr/local/bin/xmake
@@ -75,9 +72,14 @@ android {
     }
 }
 
+java {
+    toolchain {
+        languageVersion = JavaLanguageVersion.of(17)
+    }
+}
+
 dependencies {
     implementation fileTree(dir: 'libs', include: ['*.jar'])
-
     implementation 'androidx.appcompat:appcompat:1.0.2'
     testImplementation 'junit:junit:4.12'
     androidTestImplementation 'androidx.test.ext:junit:1.1.0'
diff --git a/nativelib/src/main/AndroidManifest.xml b/nativelib/src/main/AndroidManifest.xml
index 61a2f04..94cbbcf 100644
--- a/nativelib/src/main/AndroidManifest.xml
+++ b/nativelib/src/main/AndroidManifest.xml
@@ -1,2 +1 @@
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="org.tboox.xmake.nativelib" />
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" />
diff --git a/nativelib/jni/.gitignore b/nativelib/src/main/cpp/.gitignore
similarity index 100%
rename from nativelib/jni/.gitignore
rename to nativelib/src/main/cpp/.gitignore
diff --git a/nativelib/jni/Android.mk b/nativelib/src/main/cpp/Android.mk
similarity index 100%
rename from nativelib/jni/Android.mk
rename to nativelib/src/main/cpp/Android.mk
diff --git a/nativelib/jni/Application.mk b/nativelib/src/main/cpp/Application.mk
similarity index 100%
rename from nativelib/jni/Application.mk
rename to nativelib/src/main/cpp/Application.mk
diff --git a/nativelib/jni/CMakeLists.txt b/nativelib/src/main/cpp/CMakeLists.txt
similarity index 100%
rename from nativelib/jni/CMakeLists.txt
rename to nativelib/src/main/cpp/CMakeLists.txt
diff --git a/nativelib/jni/nativelib.cc b/nativelib/src/main/cpp/nativelib.cc
similarity index 100%
rename from nativelib/jni/nativelib.cc
rename to nativelib/src/main/cpp/nativelib.cc
diff --git a/nativelib/jni/xmake.lua b/nativelib/src/main/cpp/xmake.lua
similarity index 100%
rename from nativelib/jni/xmake.lua
rename to nativelib/src/main/cpp/xmake.lua


Reviews:
user: login: kekopom
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-09T19:26:41Z
user: login: waruqi
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-10T12:06:56Z
user: login: kekopom
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-11T00:48:18Z

Review comments:
diff_hunk: @@ -20,8 +20,13 @@ android {
     }
 }
 
+java {
+    toolchain {
+        languageVersion = JavaLanguageVersion.of(17)
+    }
+}
+
 dependencies {
-    implementation fileTree(dir: 'libs', include: ['*.jar'])
path: app/build.gradle
user: login: kekopom
body: To be honest: I didn't understand this line, so I removed it
created_at: 2025-05-09T19:26:41Z
author_association: CONTRIBUTOR
diff_hunk: @@ -20,8 +20,13 @@ android {
     }
 }
 
+java {
+    toolchain {
+        languageVersion = JavaLanguageVersion.of(17)
+    }
+}
+
 dependencies {
-    implementation fileTree(dir: 'libs', include: ['*.jar'])
path: app/build.gradle
user: login: waruqi
body: we use it to test and debug local plugin.
created_at: 2025-05-10T12:06:56Z
author_association: MEMBER
diff_hunk: @@ -20,8 +20,13 @@ android {
     }
 }
 
+java {
+    toolchain {
+        languageVersion = JavaLanguageVersion.of(17)
+    }
+}
+
 dependencies {
-    implementation fileTree(dir: 'libs', include: ['*.jar'])
path: app/build.gradle
user: login: kekopom
body: re-added them then
created_at: 2025-05-11T00:48:18Z
author_association: CONTRIBUTOR

PR comments:
user: login: waruqi
created_at: 2025-05-10T12:47:02Z
body: Did you test it? I meet some errors.

```
> Task :nativelib:mergeDebugJniLibFolders FAILED
ERROR: [armeabi-v7a/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/armeabi-v7a/libpng.so [armeabi-v7a/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/armeab
i-v7a/libpng.so [armeabi-v7a/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/armeabi-v7a/libpng.so: Resource and asset merger: Duplicate resources
ERROR: [armeabi-v7a/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/armeabi-v7a/libpng.so [armeabi-v7a/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/armeab
i-v7a/libpng.so [armeabi-v7a/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/armeabi-v7a/libpng.so: Resource and asset merger: Duplicate resources
ERROR: [armeabi-v7a/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/armeabi-v7a/libnativelib.so [armeabi-v7a/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nat
ivelib/libs/armeabi-v7a/libnativelib.so [armeabi-v7a/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/armeabi-v7a/libnativelib.so: Resource and asset merger: Duplicate resou
rces
ERROR: [armeabi-v7a/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/armeabi-v7a/libnativelib.so [armeabi-v7a/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nat
ivelib/libs/armeabi-v7a/libnativelib.so [armeabi-v7a/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/armeabi-v7a/libnativelib.so: Resource and asset merger: Duplicate resou
rces
ERROR: [armeabi-v7a/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/armeabi-v7a/libc++_shared.so [armeabi-v7a/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/
nativelib/libs/armeabi-v7a/libc++_shared.so [armeabi-v7a/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/armeabi-v7a/libc++_shared.so: Resource and asset merger: Duplicate
 resources
ERROR: [armeabi-v7a/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/armeabi-v7a/libc++_shared.so [armeabi-v7a/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/
nativelib/libs/armeabi-v7a/libc++_shared.so [armeabi-v7a/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/armeabi-v7a/libc++_shared.so: Resource and asset merger: Duplicate
 resources
ERROR: [arm64-v8a/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/arm64-v8a/libpng.so [arm64-v8a/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/arm64-v8a/li
bpng.so [arm64-v8a/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/arm64-v8a/libpng.so: Resource and asset merger: Duplicate resources
ERROR: [arm64-v8a/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/arm64-v8a/libpng.so [arm64-v8a/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/arm64-v8a/li
bpng.so [arm64-v8a/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/arm64-v8a/libpng.so: Resource and asset merger: Duplicate resources
ERROR: [arm64-v8a/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/arm64-v8a/libnativelib.so [arm64-v8a/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nativelib
/libs/arm64-v8a/libnativelib.so [arm64-v8a/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/arm64-v8a/libnativelib.so: Resource and asset merger: Duplicate resources
ERROR: [arm64-v8a/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/arm64-v8a/libnativelib.so [arm64-v8a/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nativelib
/libs/arm64-v8a/libnativelib.so [arm64-v8a/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/arm64-v8a/libnativelib.so: Resource and asset merger: Duplicate resources
ERROR: [arm64-v8a/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/arm64-v8a/libc++_shared.so [arm64-v8a/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/native
lib/libs/arm64-v8a/libc++_shared.so [arm64-v8a/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/arm64-v8a/libc++_shared.so: Resource and asset merger: Duplicate resources
ERROR: [arm64-v8a/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/arm64-v8a/libc++_shared.so [arm64-v8a/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/native
lib/libs/arm64-v8a/libc++_shared.so [arm64-v8a/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/arm64-v8a/libc++_shared.so: Resource and asset merger: Duplicate resources
ERROR: [x86_64/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86_64/libpng.so [x86_64/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86_64/libpng.so [x86
_64/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86_64/libpng.so: Resource and asset merger: Duplicate resources
ERROR: [x86_64/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86_64/libpng.so [x86_64/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86_64/libpng.so [x86
_64/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86_64/libpng.so: Resource and asset merger: Duplicate resources
ERROR: [x86_64/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86_64/libnativelib.so [x86_64/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86
_64/libnativelib.so [x86_64/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86_64/libnativelib.so: Resource and asset merger: Duplicate resources
ERROR: [x86_64/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86_64/libnativelib.so [x86_64/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86
_64/libnativelib.so [x86_64/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86_64/libnativelib.so: Resource and asset merger: Duplicate resources
ERROR: [x86_64/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86_64/libc++_shared.so [x86_64/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/
x86_64/libc++_shared.so [x86_64/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86_64/libc++_shared.so: Resource and asset merger: Duplicate resources
ERROR: [x86_64/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86_64/libc++_shared.so [x86_64/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/
x86_64/libc++_shared.so [x86_64/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86_64/libc++_shared.so: Resource and asset merger: Duplicate resources

[Incubating] Problems report is available at: file:///Users/ruki/projects/personal/xmake-gradle/build/reports/problems/problems-report.html

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':nativelib:mergeDebugJniLibFolders'.
> [armeabi-v7a/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/armeabi-v7a/libpng.so       [armeabi-v7a/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/armea
bi-v7a/libpng.so [armeabi-v7a/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/armeabi-v7a/libpng.so: Error: Duplicate resources
  [armeabi-v7a/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/armeabi-v7a/libpng.so       [armeabi-v7a/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/armea
bi-v7a/libpng.so [armeabi-v7a/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/armeabi-v7a/libpng.so: Error: Duplicate resources
  [armeabi-v7a/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/armeabi-v7a/libnativelib.so   [armeabi-v7a/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/native
lib/libs/armeabi-v7a/libnativelib.so     [armeabi-v7a/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/armeabi-v7a/libnativelib.so: Error: Duplicate resources
  [armeabi-v7a/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/armeabi-v7a/libnativelib.so   [armeabi-v7a/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/native
lib/libs/armeabi-v7a/libnativelib.so     [armeabi-v7a/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/armeabi-v7a/libnativelib.so: Error: Duplicate resources
  [armeabi-v7a/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/armeabi-v7a/libc++_shared.so [armeabi-v7a/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/nativ
elib/libs/armeabi-v7a/libc++_shared.so   [armeabi-v7a/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/armeabi-v7a/libc++_shared.so: Error: Duplicate resources
  [armeabi-v7a/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/armeabi-v7a/libc++_shared.so [armeabi-v7a/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/nativ
elib/libs/armeabi-v7a/libc++_shared.so   [armeabi-v7a/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/armeabi-v7a/libc++_shared.so: Error: Duplicate resources
  [arm64-v8a/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/arm64-v8a/libpng.so   [arm64-v8a/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/arm64-v8a/libpn
g.so     [arm64-v8a/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/arm64-v8a/libpng.so: Error: Duplicate resources
  [arm64-v8a/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/arm64-v8a/libpng.so   [arm64-v8a/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/arm64-v8a/libpn
g.so     [arm64-v8a/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/arm64-v8a/libpng.so: Error: Duplicate resources
  [arm64-v8a/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/arm64-v8a/libnativelib.so       [arm64-v8a/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nativeli
b/libs/arm64-v8a/libnativelib.so [arm64-v8a/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/arm64-v8a/libnativelib.so: Error: Duplicate resources
  [arm64-v8a/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/arm64-v8a/libnativelib.so       [arm64-v8a/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nativeli
b/libs/arm64-v8a/libnativelib.so [arm64-v8a/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/arm64-v8a/libnativelib.so: Error: Duplicate resources
  [arm64-v8a/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/arm64-v8a/libc++_shared.so     [arm64-v8a/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/nativel
ib/libs/arm64-v8a/libc++_shared.so       [arm64-v8a/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/arm64-v8a/libc++_shared.so: Error: Duplicate resources
  [arm64-v8a/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/arm64-v8a/libc++_shared.so     [arm64-v8a/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/nativel
ib/libs/arm64-v8a/libc++_shared.so       [arm64-v8a/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/arm64-v8a/libc++_shared.so: Error: Duplicate resources
  [x86_64/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86_64/libpng.so [x86_64/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86_64/libpng.so   [x86_64
/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86_64/libpng.so: Error: Duplicate resources
  [x86_64/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86_64/libpng.so [x86_64/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86_64/libpng.so   [x86_64
/libpng.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86_64/libpng.so: Error: Duplicate resources
  [x86_64/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86_64/libnativelib.so     [x86_64/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86_
64/libnativelib.so       [x86_64/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86_64/libnativelib.so: Error: Duplicate resources
  [x86_64/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86_64/libnativelib.so     [x86_64/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86_
64/libnativelib.so       [x86_64/libnativelib.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86_64/libnativelib.so: Error: Duplicate resources
  [x86_64/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86_64/libc++_shared.so   [x86_64/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86
_64/libc++_shared.so     [x86_64/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86_64/libc++_shared.so: Error: Duplicate resources
  [x86_64/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86_64/libc++_shared.so   [x86_64/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86
_64/libc++_shared.so     [x86_64/libc++_shared.so] /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/x86_64/libc++_shared.so: Error: Duplicate resources

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.14/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 11s
54 actionable tasks: 12 executed, 42 up-to-date
ruki:xmake-gradle ruki$

```
author_association: MEMBER
user: login: kekopom
created_at: 2025-05-10T12:51:15Z
body: @waruqi I made a change in the plugin that should put libs in src/main/jniLibs not in libs, it looks like you didn't build and use the local gradle xmake plugin right?

Can you try or let me know how to test locally please? I couldn't find a way to test locally sadly..
author_association: CONTRIBUTOR
user: login: waruqi
created_at: 2025-05-10T13:14:40Z
body: > Can you try or let me know how to test locally please? I couldn't find a way to test locally sadly..

### Build plugin first.

```console
$ ./gradlew gradle-xmake-plugin:build
$ ls -l gradle-xmake-plugin/build/libs
-rw-r--r--  1 ruki  staff    261  5 10 20:50 gradle-xmake-plugin-1.2.2-javadoc.jar
-rw-r--r--  1 ruki  staff  16507  5 10 20:50 gradle-xmake-plugin-1.2.2-sources.jar
-rw-r--r--  1 ruki  staff  89256  5 10 20:50 gradle-xmake-plugin-1.2.2.jar
```

### Apply local plugin

edit build.gradle to load local plugin jar.

```diff
+        classpath fileTree(dir: 'gradle-xmake-plugin/build/libs', include: ['*.jar'])
```

edit nativelib/build.gradle to apply local plugin.

```diff
-/*plugins {
-    id 'org.tboox.gradle-xmake-plugin' version '1.2.2'
-}*/
apply plugin: 'com.android.library'
+apply plugin: "org.tboox.gradle-xmake-plugin"

android {
    namespace "org.tboox.xmake.nativelib"
    compileSdkVersion 36
    ndkVersion "25.1.8937393"

+        xmake {
            logLevel "verbose"
            path "src/main/cpp/xmake.lua"
            buildMode "debug"
            //arguments "--test=y"
            //program /usr/local/bin/xmake
            stl "c++_shared"
            //stdcxx false
            //ndk "/Users/ruki/files/android-ndk-r20b/"
            //sdkver 21
        }

```

and enable xmake configuration block.

```console
 ./gradlew app:assembleDebug
```


author_association: MEMBER
user: login: kekopom
created_at: 2025-05-10T14:04:44Z
body: Thanks for the instructions I've been able to test locally
Indeed modifying the path to src/main/jniLibs doesn't change anything, still duplicate resources_

author_association: CONTRIBUTOR
user: login: kekopom
created_at: 2025-05-11T00:54:36Z
body: @waruqi I'm able to build locally now. I forgot to change the path of jniLibs in XMakeTaskContext as well.

Could you try again please? I saw that you had libpng duplicate resources, on my side I don't have it at all ... have you done something to get the libpng.so in the jni folder?

Let me you know if it works on your side please
author_association: CONTRIBUTOR
user: login: waruqi
created_at: 2025-05-11T09:03:52Z
body: I tried it, it does not work.

```console
* What went wrong:
Execution failed for task ':nativelib:xmakeConfigureForArm64'.
> No such property: absoluteFile for class: org.gradle.api.internal.file.DefaultFilePropertyFactory$DefaultDirectoryVar

* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':nativelib:xmakeConfigureForArm64'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:130)
        at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:293)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:128)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:116)
        at org.gradle.api.internal.tasks.execution.ProblemsTaskPathTrackingTaskExecuter.execute(ProblemsTaskPathTrackingTaskExecuter.java:41)
        at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:74)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:210)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:205)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:67)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:60)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:167)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:60)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:54)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
        at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:42)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:331)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:318)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.lambda$execute$0(DefaultTaskExecutionGraph.java:314)
        at org.gradle.internal.operations.CurrentBuildOperationRef.with(CurrentBuildOperationRef.java:85)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:314)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:303)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:459)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:376)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:48)
Caused by: groovy.lang.MissingPropertyException: No such property: absoluteFile for class: org.gradle.api.internal.file.DefaultFilePropertyFactory$DefaultDirectoryVar
        at org.tboox.gradle.XMakeTaskContext.getBuildDirectory(XMakeTaskContext.groovy:151)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at org.tboox.gradle.XMakeConfigureTask.buildCmdLine(XMakeConfigureTask.groovy:116)
        at org.tboox.gradle.XMakeConfigureTask.configure(XMakeConfigureTask.groovy:130)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:125)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51)
        at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29)
        at org.gradle.api.internal.tasks.execution.TaskExecution$3.run(TaskExecution.java:244)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:30)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:27)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:67)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:60)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:167)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:60)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:48)
        at org.gradle.api.internal.tasks.execution.TaskExecution.executeAction(TaskExecution.java:229)
        at org.gradle.api.internal.tasks.execution.TaskExecution.executeActions(TaskExecution.java:212)
        at org.gradle.api.internal.tasks.execution.TaskExecution.executeWithPreviousOutputFiles(TaskExecution.java:195)
        at org.gradle.api.internal.tasks.execution.TaskExecution.execute(TaskExecution.java:162)
        at org.gradle.internal.execution.steps.ExecuteStep.executeInternal(ExecuteStep.java:105)
        at org.gradle.internal.execution.steps.ExecuteStep.access$000(ExecuteStep.java:44)
        at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:59)
        at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:56)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:210)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:205)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:67)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:60)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:167)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:60)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:54)
        at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:56)
        at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:44)
        at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:42)
        at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:75)
        at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:55)
        at org.gradle.internal.execution.steps.PreCreateOutputParentsStep.execute(PreCreateOutputParentsStep.java:50)
        at org.gradle.internal.execution.steps.PreCreateOutputParentsStep.execute(PreCreateOutputParentsStep.java:28)
        at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:67)
        at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:37)
        at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:61)
        at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:26)
        at org.gradle.internal.execution.steps.CaptureOutputsAfterExecutionStep.execute(CaptureOutputsAfterExecutionStep.java:69)
        at org.gradle.internal.execution.steps.CaptureOutputsAfterExecutionStep.execute(CaptureOutputsAfterExecutionStep.java:46)
        at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:40)
        at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:29)
        at org.gradle.internal.execution.steps.BuildCacheStep.executeWithoutCache(BuildCacheStep.java:189)
        at org.gradle.internal.execution.steps.BuildCacheStep.lambda$execute$1(BuildCacheStep.java:75)
        at org.gradle.internal.Either$Right.fold(Either.java:175)
        at org.gradle.internal.execution.caching.CachingState.fold(CachingState.java:62)
        at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:73)
        at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:48)
        at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:46)
        at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:35)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:75)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$2(SkipUpToDateStep.java:53)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:53)
        at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:35)
        at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:37)
        at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:27)
        at org.gradle.internal.execution.steps.ResolveIncrementalCachingStateStep.executeDelegate(ResolveIncrementalCachingStateStep.java:49)
        at org.gradle.internal.execution.steps.ResolveIncrementalCachingStateStep.executeDelegate(ResolveIncrementalCachingStateStep.java:27)
        at org.gradle.internal.execution.steps.AbstractResolveCachingStateStep.execute(AbstractResolveCachingStateStep.java:71)
        at org.gradle.internal.execution.steps.AbstractResolveCachingStateStep.execute(AbstractResolveCachingStateStep.java:39)
        at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:65)
        at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:36)
        at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:107)
        at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:56)
        at org.gradle.internal.execution.steps.AbstractCaptureStateBeforeExecutionStep.execute(AbstractCaptureStateBeforeExecutionStep.java:64)
        at org.gradle.internal.execution.steps.AbstractCaptureStateBeforeExecutionStep.execute(AbstractCaptureStateBeforeExecutionStep.java:43)
        at org.gradle.internal.execution.steps.AbstractSkipEmptyWorkStep.executeWithNonEmptySources(AbstractSkipEmptyWorkStep.java:125)
        at org.gradle.internal.execution.steps.AbstractSkipEmptyWorkStep.execute(AbstractSkipEmptyWorkStep.java:56)
        at org.gradle.internal.execution.steps.AbstractSkipEmptyWorkStep.execute(AbstractSkipEmptyWorkStep.java:36)
        at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:38)
        at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:36)
        at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:23)
        at org.gradle.internal.execution.steps.HandleStaleOutputsStep.execute(HandleStaleOutputsStep.java:75)
        at org.gradle.internal.execution.steps.HandleStaleOutputsStep.execute(HandleStaleOutputsStep.java:41)
        at org.gradle.internal.execution.steps.AssignMutableWorkspaceStep.lambda$execute$0(AssignMutableWorkspaceStep.java:35)
        at org.gradle.api.internal.tasks.execution.TaskExecution$4.withWorkspace(TaskExecution.java:289)
        at org.gradle.internal.execution.steps.AssignMutableWorkspaceStep.execute(AssignMutableWorkspaceStep.java:31)
        at org.gradle.internal.execution.steps.AssignMutableWorkspaceStep.execute(AssignMutableWorkspaceStep.java:22)
        at org.gradle.internal.execution.steps.ChoosePipelineStep.execute(ChoosePipelineStep.java:40)
        at org.gradle.internal.execution.steps.ChoosePipelineStep.execute(ChoosePipelineStep.java:23)
        at org.gradle.internal.execution.steps.ExecuteWorkBuildOperationFiringStep.lambda$execute$2(ExecuteWorkBuildOperationFiringStep.java:67)
        at org.gradle.internal.execution.steps.ExecuteWorkBuildOperationFiringStep.execute(ExecuteWorkBuildOperationFiringStep.java:67)
        at org.gradle.internal.execution.steps.ExecuteWorkBuildOperationFiringStep.execute(ExecuteWorkBuildOperationFiringStep.java:39)
        at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:46)
        at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:34)
        at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:48)
        at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:35)
        at org.gradle.internal.execution.impl.DefaultExecutionEngine$1.execute(DefaultExecutionEngine.java:64)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:127)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:116)
        at org.gradle.api.internal.tasks.execution.ProblemsTaskPathTrackingTaskExecuter.execute(ProblemsTaskPathTrackingTaskExecuter.java:41)
        at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:74)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:210)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:205)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:67)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:60)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:167)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:60)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:54)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
        at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:42)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:331)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:318)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.lambda$execute$0(DefaultTaskExecutionGraph.java:314)
        at org.gradle.internal.operations.CurrentBuildOperationRef.with(CurrentBuildOperationRef.java:85)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:314)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:303)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:459)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:376)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:48)


Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.14/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 966ms
2 actionable tasks: 1 executed, 1 up-to-date
```
author_association: MEMBER
user: login: kekopom
created_at: 2025-05-11T11:08:14Z
body: @waruqi fixed
author_association: CONTRIBUTOR
user: login: waruqi
created_at: 2025-05-11T12:54:59Z
body: it works, thanks.
author_association: MEMBER