Skip to content

Commit 3259f30

Browse files
committed
update to 1.1.7
1 parent b14b2f5 commit 3259f30

File tree

6 files changed

+17
-20
lines changed

6 files changed

+17
-20
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ XMake installed on the system. Available [here](https://github.com/xmake-io/xmak
5656

5757
```
5858
plugins {
59-
id 'org.tboox.gradle-xmake-plugin' version '1.1.6'
59+
id 'org.tboox.gradle-xmake-plugin' version '1.1.7'
6060
}
6161
```
6262

@@ -70,7 +70,7 @@ buildscript {
7070
}
7171
}
7272
dependencies {
73-
classpath 'org.tboox:gradle-xmake-plugin:1.1.6'
73+
classpath 'org.tboox:gradle-xmake-plugin:1.1.7'
7474
}
7575
repositories {
7676
mavenCentral()

README_zh.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ xmake-gradle是一个无缝整合xmake的gradle插件。
5656

5757
```
5858
plugins {
59-
id 'org.tboox.gradle-xmake-plugin' version '1.1.6'
59+
id 'org.tboox.gradle-xmake-plugin' version '1.1.7'
6060
}
6161
```
6262

@@ -70,7 +70,7 @@ buildscript {
7070
}
7171
}
7272
dependencies {
73-
classpath 'org.tboox:gradle-xmake-plugin:1.1.6'
73+
classpath 'org.tboox:gradle-xmake-plugin:1.1.7'
7474
}
7575
repositories {
7676
mavenCentral()

gradle-xmake-plugin/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ plugins {
88
apply plugin: 'groovy'
99

1010
group = "org.tboox"
11-
version = "1.1.6"
11+
version = "1.1.7"
1212

1313
repositories {
1414
// Use mavenCentral for resolving your dependencies.

gradle-xmake-plugin/src/main/groovy/org/tboox/gradle/XMakeConfigureTask.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class XMakeConfigureTask extends DefaultTask {
110110
} else {
111111
String stl = taskContext.stl
112112
if (stl != null) {
113-
parameters.add("--ndk_cxxstl=" + stl)
113+
parameters.add("--runtimes=" + stl)
114114
}
115115
}
116116
parameters.add("--buildir=" + taskContext.buildDirectory.path)

gradle-xmake-plugin/src/main/resources/lua/install_artifacts.lua

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ function _get_targets(...)
1010
if targetNames.n > 0 then
1111
for _, targetName in ipairs(targetNames) do
1212
local target = project.target(targetName)
13-
if target:get("enabled") ~= false and target:targetkind() == "shared" then
13+
if target:get("enabled") ~= false and target:is_shared() then
1414
table.insert(targets, target)
1515
else
1616
raise("invalid target(%s)!", targetName)
1717
end
1818
end
1919
else
20-
for _, target in pairs(project.targets()) do
20+
for _, target in ipairs(project.ordertargets()) do
2121
local default = target:get("default")
22-
if (default == nil or default == true) and target:targetkind() == "shared" then
22+
if (default == nil or default == true) and target:is_shared() then
2323
table.insert(targets, target)
2424
end
2525
end
@@ -29,8 +29,6 @@ end
2929

3030
-- install artifacts
3131
function _install_artifacts(libsdir, installdir, targets, arch)
32-
33-
-- append arch sub-directory
3432
libsdir = path.join(libsdir, arch, "lib")
3533
installdir = path.join(installdir, arch)
3634

@@ -45,22 +43,20 @@ end
4543

4644
-- install cxxstl for ndk >= r25
4745
function _install_cxxstl_newer_ndk(installdir, arch)
48-
-- append arch sub-directory
4946
installdir = path.join(installdir, arch)
5047

5148
local ndk = get_config("ndk")
5249
local ndk_cxxstl = get_config("ndk_cxxstl")
53-
5450
if ndk and ndk_cxxstl and ndk_cxxstl:endswith("_shared") and arch then
55-
51+
5652
-- get the toolchains arch
5753
local toolchains_archs = {
5854
["armeabi-v7a"] = "arm-linux-androideabi",
5955
["arm64-v8a"] = "aarch64-linux-android",
6056
["x86"] = "i686-linux-android",
6157
["x86_64"] = "x86_64-linux-android"
6258
}
63-
59+
6460
-- get stl library
6561
local cxxstl_filename
6662
if ndk_cxxstl == "c++_shared" then
@@ -71,7 +67,7 @@ function _install_cxxstl_newer_ndk(installdir, arch)
7167
local ndk_toolchain = toolchain.load("ndk", {plat = config.plat(), arch = config.arch()})
7268
local ndk_sysroot = ndk_toolchain:config("ndk_sysroot")
7369
local cxxstl_sdkdir_llvmstl = path.translate(format("%s/usr/lib/%s", ndk_sysroot, toolchains_archs[arch]))
74-
70+
7571
os.vcp(path.join(cxxstl_sdkdir_llvmstl, cxxstl_filename), path.join(installdir, cxxstl_filename))
7672
end
7773

@@ -181,7 +177,7 @@ function main(libsdir, installdir, archs, ...)
181177
for _, arch in ipairs({"armeabi", "armeabi-v7a", "arm64-v8a", "x86", "x86_64"}) do
182178
if abi_filters[arch] then
183179
_install_artifacts(libsdir, installdir, targets, arch)
184-
180+
185181
if get_config("ndkver") >= 25 then
186182
_install_cxxstl_newer_ndk(installdir, arch)
187183
else

nativelib/build.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id 'org.tboox.gradle-xmake-plugin' version '1.1.6'
2+
id 'org.tboox.gradle-xmake-plugin' version '1.1.7'
33
}
44
apply plugin: 'com.android.library'
55
//apply plugin: "org.tboox.gradle-xmake-plugin"
@@ -52,8 +52,9 @@ android {
5252
path "jni/CMakeLists.txt"
5353
}*/
5454

55+
/*
5556
xmake {
56-
//logLevel "verbose"
57+
logLevel "verbose"
5758
path "jni/xmake.lua"
5859
buildMode "debug"
5960
//arguments "--test=y"
@@ -62,7 +63,7 @@ android {
6263
//stdcxx false
6364
//ndk "/Users/ruki/files/android-ndk-r20b/"
6465
//sdkver 21
65-
}
66+
}*/
6667
}
6768

6869
buildTypes {

0 commit comments

Comments
 (0)