Skip to content

Commit 5c6aa13

Browse files
Update install scripts
1 parent 4f062df commit 5c6aa13

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ allprojects {
3232
else -> throw IllegalArgumentException("Unknown platform: $triplet")
3333
}
3434

35-
ext["platform"] = getPlatform(project.properties["target"] as? String ?: "")
35+
ext["platform"] = getPlatform(project.property("target") as? String ?: throw AssertionError("Invalid target"))
3636
}

build.sh

+6-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@
88
# Example: ./build.sh x86_64-unknown-linux-gnu
99
####################################################################################
1010

11+
target=$1
12+
13+
echo "Building for target: $target"
14+
1115
pushd native
12-
cargo build -r --target=$1
16+
cargo build -r --target=$target
1317
popd
1418

1519
chmod u+x gradlew
16-
./gradlew build -Dtarget=$1
20+
./gradlew --console plain build -Ptarget=$target

install.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
# Example: ./install.sh x86_64-unknown-linux-gnu
99
####################################################################################
1010

11-
./build.sh $1
12-
./gradlew publishToMavenLocal -Dtarget=$1
11+
target=$1
12+
./build.sh $target
13+
./gradlew --console plain publishToMavenLocal -Ptarget=$target

0 commit comments

Comments
 (0)