These are chat archives for scala-android/sbt-android

8th
Mar 2017
Ben Neill
@asgarddesigns
Mar 08 2017 00:14

ok, so I am running 'sbt clean android:package-release'

from the point after proguard (the proguard output is pretty huge, this seems to be the pertinent part)

http://pastebin.com/VRzuAb53

Perry
@pfn
Mar 08 2017 00:14
you didn't set build type release
`variant release
variant release
Ben Neill
@asgarddesigns
Mar 08 2017 00:16
ahh right, as in sbt clean variant release?
[success] Total time: 0 s, completed 08/03/2017 10:16:15 AM
[info] <companyname>-android: buildType=(none) flavor=(none)
[info] Available buildTypes:
[info]   release
[info] Available flavors:
[info]   (none)
[error] Not a valid command: release (similar: reload, last, alias)
[error] Not a valid key: release (similar: set-release, sign-release, setRelease)
[error] release
[error]        ^
Perry
@pfn
Mar 08 2017 00:18
sbt "variant release" android:packageRelease
must quote correctly
Ben Neill
@asgarddesigns
Mar 08 2017 00:21
[info] Generating dex, multidex=true :-D Awesome, cheers mate.
when I have a moment, I will add/update these configs to the examples. The current ones seem to be using the deprecated methods.
Ben Neill
@asgarddesigns
Mar 08 2017 06:27
Hey, one other thing, what is the best way to rename the generated apk to have the version name at the end (i.e. appname-release-v1.2.3.apk) Can't seem to find anything that works, and not that familiar with SBT!
Perry
@pfn
Mar 08 2017 06:28
packageRelease := { val f = packageRelease.value; f.renameTo(...); f}
Ben Neill
@asgarddesigns
Mar 08 2017 06:31
awesome, cheers!
Alex Reisberg
@a-reisberg
Mar 08 2017 19:56
I'm reinstalling stuff on my computer, but keep getting ANDROID_HOME not set
event though it's set
Perry
@pfn
Mar 08 2017 19:56
it must not be for it to say so
Alex Reisberg
@a-reisberg
Mar 08 2017 19:56
I know right :D
but echo $ANDROID_HOME
points to the right place
Perry
@pfn
Mar 08 2017 19:57
env | grep ANDROID_HOME
Alex Reisberg
@a-reisberg
Mar 08 2017 19:57
ANDROID_HOME=~/Downloads/DownloadedBin/AndroidSdk
which is where I downloaded it
Rafal Wachol
@charafau
Mar 08 2017 19:57
Restart 😉
Alex Reisberg
@a-reisberg
Mar 08 2017 19:58
AndroidSdk contains:
build-tools
extras
platform-tools
platforms
sources
system-images
tools
@charafau Already did :/
Perry
@pfn
Mar 08 2017 19:58
dunno, but it's not recognized as being exported
Rafal Wachol
@charafau
Mar 08 2017 19:58
What's the shell
Perry
@pfn
Mar 08 2017 19:58
the shell you're launching sbt from hasn't set it
Rafal Wachol
@charafau
Mar 08 2017 19:59
Show how you're exporting it
Perry
@pfn
Mar 08 2017 19:59
env | grep ANDROID_HOME is that
Alex Reisberg
@a-reisberg
Mar 08 2017 19:59
so if i'm doing echo $ANDROID_HOME in my shell, and it prints out the correct thing, it can still be wrong
?
Perry
@pfn
Mar 08 2017 19:59
must verify with env
there are local vs. env variables in shell
thus there's export vs just setting
Alex Reisberg
@a-reisberg
Mar 08 2017 20:00
i have export in my .bash_profile
export ANDROID_HOME="~/Downloads/DownloadedBin/AndroidSdk"
export PATH="$ANDROID_HOME:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH"
Perry
@pfn
Mar 08 2017 20:01
anyway, the shell/script from which you're launching sbt does not have ANDROID_HOME set
Alex Reisberg
@a-reisberg
Mar 08 2017 20:02
noob question: how do I fix that? :D
Perry
@pfn
Mar 08 2017 20:02
dunno, how are you running it?
Alex Reisberg
@a-reisberg
Mar 08 2017 20:03
inside my shell (where I echo $ANDROID_HOME works), i do sbt (under an android project)
then it starts complaining immediately
and starts downloading stuff to .android/sbt/sdk
Perry
@pfn
Mar 08 2017 20:03
that's pretty much impossible....
Alex Reisberg
@a-reisberg
Mar 08 2017 20:04
well, I hope that it's impossible too
:D
Perry
@pfn
Mar 08 2017 20:04
is this linux? or osx
Alex Reisberg
@a-reisberg
Mar 08 2017 20:04
osx
Perry
@pfn
Mar 08 2017 20:05
ps axewww | grep sbt
and you should verify whether ANDROID_HOME is missing
Alex Reisberg
@a-reisberg
Mar 08 2017 20:05
it's there
 1335 s000  S+     0:00.00 grep sbt TERM_PROGRAM=iTerm.app ANDROID_HOME=~/Downloads/DownloadedBin/AndroidSdk ....
Rafal Wachol
@charafau
Mar 08 2017 20:06
Why not .bash_rc
Perry
@pfn
Mar 08 2017 20:06
12:06 <a-reisberg> 1335 s000 S+ 0:00.00 grep sbt TERM_PROGRAM=iTerm.app
look at what you just pasted
you pasted grep sbt
Alex Reisberg
@a-reisberg
Mar 08 2017 20:07
?
you told me to paste grep sbt
no?
Perry
@pfn
Mar 08 2017 20:07
no, you pasted the ps line for grep sbt
not sbt
1335 s000 S+ 0:00.00 grep sbt
Alex Reisberg
@a-reisberg
Mar 08 2017 20:08
wait, so I typed in ps axewww | grep sbt, which is correct right?
Perry
@pfn
Mar 08 2017 20:08
yes, but you looked at the wrong line
Alex Reisberg
@a-reisberg
Mar 08 2017 20:09
frankly speaking, I don't know what to look for. What should I look for?
Perry
@pfn
Mar 08 2017 20:09
ps axewww | grep [s]bt
ps axewww | grep -w [s]bt
Alex Reisberg
@a-reisberg
Mar 08 2017 20:10
[s] in bracket?
Perry
@pfn
Mar 08 2017 20:10
yes, so you don't look at grep sbt
Alex Reisberg
@a-reisberg
Mar 08 2017 20:10
if I type ps axewww | grep -w [s]bt I get empty
Perry
@pfn
Mar 08 2017 20:10
you're not running sbt...
Alex Reisberg
@a-reisberg
Mar 08 2017 20:11
right, because it starts downloading... k let me run it and run your command
Perry
@pfn
Mar 08 2017 20:12
oh, I see what the problem is, it doesn't accept ~
Alex Reisberg
@a-reisberg
Mar 08 2017 20:12
 1380 s000  S+     0:20.04 /usr/bin/java -XX:+CMSClassUnloadingEnabled -Xms1536m -Xmx1536m -XX:MaxPermSize=384m -XX:ReservedCodeCacheSize=192m -Dfile.encoding=UTF8 -jar /opt/local/share/sbt/sbt-launch.jar TERM_PROGRAM=iTerm.app ANDROID_HOME=~/Downloads/DownloadedBin/AndroidSdk SHELL=/bin/bash
...
oh
interesting
it being sbt or smth shell thing?
Perry
@pfn
Mar 08 2017 20:13
a java thing
Alex Reisberg
@a-reisberg
Mar 08 2017 20:13
i see
k that's easy
let me put in the full path
Perry
@pfn
Mar 08 2017 20:14
$HOME/... would work
since the shell expands it when setting
Alex Reisberg
@a-reisberg
Mar 08 2017 20:15
awesome!
thanks!!! :)
Perry
@pfn
Mar 08 2017 20:15
I guess there's room for a warning if a tilde is detected in the path
Alex Reisberg
@a-reisberg
Mar 08 2017 20:16
you're awesome. I spent like more than 1 hr on this :)
Perry
@pfn
Mar 08 2017 20:23
I mean, could hack for ~/ but I don't like it
Alex Reisberg
@a-reisberg
Mar 08 2017 20:24
This is good. Just need to know it. Thanks!
Perry
@pfn
Mar 08 2017 20:24
warning will show up in 1.7.7 if you use ~ in android_home, so less time wasted next time
Alex Reisberg
@a-reisberg
Mar 08 2017 20:24
nice, thanks :)
Perry
@pfn
Mar 08 2017 20:24
whenever I get around to publishing 1.7.7