diff options
author | Tomasz Kramkowski <tomasz@kramkow.ski> | 2023-04-13 23:53:48 +0200 |
---|---|---|
committer | Tomasz Kramkowski <tomasz@kramkow.ski> | 2023-04-14 03:12:14 +0200 |
commit | db091bfd1db36ab66340ccad2eb7b6393a0aa3da (patch) | |
tree | 5a70412afcb4d32086effffe84d7de3161790f46 /default.jar.do | |
parent | e27870b137aeab108816f4eb80ddaea1e639c3fb (diff) | |
download | android-jetpack-compose-redo-db091bfd1db36ab66340ccad2eb7b6393a0aa3da.tar.gz android-jetpack-compose-redo-db091bfd1db36ab66340ccad2eb7b6393a0aa3da.tar.xz android-jetpack-compose-redo-db091bfd1db36ab66340ccad2eb7b6393a0aa3da.zip |
Basic kotlin java application working
Diffstat (limited to 'default.jar.do')
-rw-r--r-- | default.jar.do | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/default.jar.do b/default.jar.do new file mode 100644 index 0000000..a324074 --- /dev/null +++ b/default.jar.do @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +set -e +src=${1%.jar} +redo-ifchange .vars.rc +. ./.vars.rc +classpath=($PLATFORM/android.jar) +tmp=$(mktemp -d) +trap 'rm -rf "$tmp"' EXIT +if [[ $1 != R.jar ]]; then classpath+=(R.jar); fi +for e in "${classpath[@]}"; do redo-ifchange "$e"; done +IFS=:; classpath=${classpath[*]} +if [[ -f "$src.kt" ]]; then + src="$src.kt" + redo-ifchange "$KOTLINC" "$src" + "$KOTLINC" -jvm-target 1.8 -cp "$classpath" -d "$tmp" "$src" +else + src="$src.java" + redo-ifchange "$JAVAC" "$src" + "$JAVAC" -source 11 -target 11 -classpath "$classpath" -d "$tmp" "$src" +fi +jar --create --no-compress --date=2000-01-01T00:00:00Z --file "$3" -C "$tmp" . +# vim:ft=bash |