Skip to content

Commit

Permalink
improve config
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Jul 1, 2020
1 parent de06bde commit fa62b46
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 18 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ XMake installed on the system. Available [here](https://github.com/xmake-io/xmak

```
plugins {
id 'org.tboox.gradle-xmake-plugin' version '1.1.0'
id 'org.tboox.gradle-xmake-plugin' version '1.1.2'
}
```

Expand All @@ -70,7 +70,7 @@ buildscript {
}
}
dependencies {
classpath 'org.tboox:gradle-xmake-plugin:1.1.0'
classpath 'org.tboox:gradle-xmake-plugin:1.1.2'
}
repositories {
mavenCentral()
Expand Down
4 changes: 2 additions & 2 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ xmake-gradle是一个无缝整合xmake的gradle插件。

```
plugins {
id 'org.tboox.gradle-xmake-plugin' version '1.1.0'
id 'org.tboox.gradle-xmake-plugin' version '1.1.2'
}
```

Expand All @@ -70,7 +70,7 @@ buildscript {
}
}
dependencies {
classpath 'org.tboox:gradle-xmake-plugin:1.1.0'
classpath 'org.tboox:gradle-xmake-plugin:1.1.2'
}
repositories {
mavenCentral()
Expand Down
2 changes: 1 addition & 1 deletion gradle-xmake-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
apply plugin: 'groovy'

group = "org.tboox"
version = "1.1.0"
version = "1.1.2"

repositories {
// Use jcenter for resolving your dependencies.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class XMakeConfigureTask extends DefaultTask {
List<String> parameters = new ArrayList<>();
parameters.add(taskContext.program)
parameters.add("f")
parameters.add("-c")
parameters.add("-y")
switch (taskContext.logLevel) {
case "verbose":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,7 @@ class XMakeTaskContext {

// get c++ stl library
String getStl() {
String stl = extension.stl
if (stl == "c++_static") {
stl = "llvmstl_static"
} else if (stl == "c++_shared") {
stl = "llvmstl_shared"
}
return stl
return extension.stl
}

// get project directory
Expand Down Expand Up @@ -220,4 +214,4 @@ class XMakeTaskContext {
String getBuildMode() {
return extension.buildMode
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function _install_cxxstl(installdir, arch)

-- get c++ sdk directory
local cxxstl_sdkdir
if ndk_cxxstl:startswith("c++") or ndk_cxxstl:startswith("llvmstl") then
if ndk_cxxstl:startswith("c++") then
cxxstl_sdkdir = cxxstl_sdkdir_llvmstl
elseif ndk_cxxstl:startswith("gnustl") then
cxxstl_sdkdir = cxxstl_sdkdir_gnustl
Expand All @@ -94,7 +94,7 @@ function _install_cxxstl(installdir, arch)

-- get stl library
local cxxstl_filename
if ndk_cxxstl == "c++_shared" or ndk_cxxstl == "llvmstl_shared" then
if ndk_cxxstl == "c++_shared" then
cxxstl_filename = "libc++_shared.so"
elseif ndk_cxxstl == "gnustl_shared" then
cxxstl_filename = "libgnustl_shared.so"
Expand Down
6 changes: 3 additions & 3 deletions nativelib/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'org.tboox.gradle-xmake-plugin' version '1.1.0'
id 'org.tboox.gradle-xmake-plugin' version '1.1.2'
}
apply plugin: 'com.android.library'
//apply plugin: "org.tboox.gradle-xmake-plugin"
Expand Down Expand Up @@ -52,11 +52,11 @@ android {
}*/

xmake {
logLevel "verbose"
//logLevel "verbose"
path "jni/xmake.lua"
buildMode "debug"
//program /usr/local/bin/xmake
//stl "c++_shared"
stl "c++_shared"
//stdcxx false
//ndk "/Users/ruki/files/android-ndk-r20b/"
//sdkver 21
Expand Down

0 comments on commit fa62b46

Please sign in to comment.