Skip to content

Commit

Permalink
update version
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Apr 16, 2020
1 parent f19fad2 commit b9a56a6
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 20 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ XMake installed on the system. Available [here](https://github.com/xmake-io/xmak

```
plugins {
id 'org.tboox.gradle-xmake-plugin' version '1.0.3'
id 'org.tboox.gradle-xmake-plugin' version '1.0.4'
}
```

Expand All @@ -69,7 +69,7 @@ buildscript {
}
}
dependencies {
classpath 'org.tboox:gradle-xmake-plugin:1.0.3'
classpath 'org.tboox:gradle-xmake-plugin:1.0.4'
}
repositories {
mavenCentral()
Expand Down Expand Up @@ -154,6 +154,9 @@ android {
// set c++stl (optional), e.g. c++_static/c++_shared, gnustl_static/gnustl_shared, stlport_static/stlport_shared
stl "c++_shared"
// set the given xmake program path (optional)
// program /usr/local/bin/xmake
// disable stdc++ library (optional)
// stdcxx false
Expand Down
7 changes: 5 additions & 2 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ xmake-gradle是一个无缝整合xmake的gradle插件。

```
plugins {
id 'org.tboox.gradle-xmake-plugin' version '1.0.3'
id 'org.tboox.gradle-xmake-plugin' version '1.0.4'
}
```

Expand All @@ -71,7 +71,7 @@ buildscript {
}
}
dependencies {
classpath 'org.tboox:gradle-xmake-plugin:1.0.3'
classpath 'org.tboox:gradle-xmake-plugin:1.0.4'
}
repositories {
mavenCentral()
Expand Down Expand Up @@ -156,6 +156,9 @@ android {
// 指定c++ stl库,默认不指定会使用c++_static,其他值:c++_static/c++_shared, gnustl_static/gnustl_shared, stlport_static/stlport_shared
stl "c++_shared"
// 设置xmake可执行程序路径(通常不用设置)
// program /usr/local/bin/xmake
// 禁用stdc++库,默认是启用的
// stdcxx false
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.0.3"
version = "1.0.4"

repositories {
// Use jcenter for resolving your dependencies.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class XMakeBuildTask extends DefaultTask {
// build command line
private List<String> buildCmdLine() {
List<String> parameters = new ArrayList<>();
parameters.add("xmake");
parameters.add("build");
parameters.add(taskContext.program)
parameters.add("build")
switch (taskContext.logLevel) {
case "warning":
parameters.add("-w")
Expand All @@ -65,8 +65,8 @@ class XMakeBuildTask extends DefaultTask {
// build install command line
private List<String> buildInstallCmdLine() {
List<String> parameters = new ArrayList<>();
parameters.add("xmake");
parameters.add("install");
parameters.add(taskContext.program)
parameters.add("install")
switch (taskContext.logLevel) {
case "verbose":
parameters.add("-v")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class XMakeCleanTask extends DefaultTask {
// build command line
private List<String> buildCmdLine() {
List<String> parameters = new ArrayList<>();
parameters.add("xmake");
parameters.add("clean");
parameters.add(taskContext.program)
parameters.add("clean")
switch (taskContext.logLevel) {
case "verbose":
parameters.add("-v")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ class XMakeConfigureTask extends DefaultTask {
// build command line
private List<String> buildCmdLine() {
List<String> parameters = new ArrayList<>();
parameters.add("xmake");
parameters.add("f");
parameters.add("-y");
parameters.add(taskContext.program)
parameters.add("f")
parameters.add("-y")
switch (taskContext.logLevel) {
case "verbose":
parameters.add("-v")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class XMakeInstallTask extends DefaultTask {
// build command line
private List<String> buildCmdLine(File installArtifactsScriptFile) {
List<String> parameters = new ArrayList<>();
parameters.add("xmake");
parameters.add(taskContext.program)
parameters.add("lua");
switch (taskContext.logLevel) {
case "verbose":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import com.sun.org.apache.xpath.internal.operations.Bool

class XMakePluginExtension {

// TODO
// xmake program
String program

// the project path (e.g. jni/xmake.lua)
String path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class XMakeRebuildTask extends DefaultTask {
// build command line
private List<String> buildCmdLine() {
List<String> parameters = new ArrayList<>();
parameters.add("xmake");
parameters.add("-r");
parameters.add(taskContext.program)
parameters.add("-r")
switch (taskContext.logLevel) {
case "warning":
parameters.add("-w")
Expand All @@ -65,8 +65,8 @@ class XMakeRebuildTask extends DefaultTask {
// build install command line
private List<String> buildInstallCmdLine() {
List<String> parameters = new ArrayList<>();
parameters.add("xmake");
parameters.add("install");
parameters.add(taskContext.program)
parameters.add("install")
switch (taskContext.logLevel) {
case "verbose":
parameters.add("-v")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ class XMakeTaskContext {
this.buildArch = buildArch
}

// get xmake program
String getProgram() {
String program = extension.program
if (program == null) {
program = "xmake"
}
return program
}

// get project file
File getProjectFile() {
String path = extension.path
Expand Down
1 change: 1 addition & 0 deletions nativelib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ android {
xmake {
logLevel "verbose"
path "jni/xmake.lua"
//program /usr/local/bin/xmake
//stl "c++_shared"
//stdcxx false
//ndk "/Users/ruki/files/android-ndk-r20b/"
Expand Down

0 comments on commit b9a56a6

Please sign in to comment.