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

31st
Dec 2017
Perry
@pfn
Dec 31 2017 00:05
@loloof64 setting local.properties is all you need by default
you didn't set signing properties correctly then
Chenai Nakam
@chenakam
Dec 31 2017 06:15
how to config Proguard when use macro
Perry
@pfn
Dec 31 2017 07:26
Proguard doesn't need to be configured to use macros
Chenai Nakam
@chenakam
Dec 31 2017 09:13
I got this java.lang.NoSuchMethodException: size [], but can't find the reason.
I use Quill Orm,
val q = quote {
      query[Person].filter(_.name == "小王")
}
laurent bernabé
@loloof64
Dec 31 2017 09:16
@pfn Thanks :) Gonna try again so :)
laurent bernabé
@loloof64
Dec 31 2017 09:31
Must local.properties be at the root of the project directory ?
laurent bernabé
@loloof64
Dec 31 2017 09:43
Finally the package-release recognized my local.properties file, but I have to correct the password. Thanks again :)
Perry
@pfn
Dec 31 2017 13:48
@chenakam probably because android is missing an api that quill needs
laurent bernabé
@loloof64
Dec 31 2017 14:11
Here my root build.sbt
enablePlugins(AndroidApp)
android.useSupportVectors

versionCode := Some(7)
versionName := Some("1.0.10")
platformTarget := "android-27"
minSdkVersion in Android :="16"
scalaVersion :="2.11.12"

val silencerVersion = "0.6"

resolvers ++= Seq(
    "Google Maven Repository" at "https://maven.google.com",
    "JitPack" at "https://jitpack.io"
)

libraryDependencies ++= Seq(
    "com.android.support" % "appcompat-v7" % "27.0.2",
    "com.android.support" % "design" % "27.0.2",
    "com.android.support.constraint" % "constraint-layout" % "1.1.0-beta4",
    "com.github.loloof64" % "chesslib" % "master",
    compilerPlugin("com.github.ghik" %% "silencer-plugin" % silencerVersion),
    "com.github.ghik" %% "silencer-lib" % silencerVersion
)
Why, after signing the application with android:package-release and importing it into Google Console, it says that the signed apk is in version 6, and not in version 7 as I tried to set up here ?
Indeed, I've already upload an apk with version 6, that's why here I try to set it up to 7
versionCode := Some(7) : is that correct ?
laurent bernabé
@loloof64
Dec 31 2017 14:59
After some investigation, I've adapted my build.sbt to the following, but does not work either
enablePlugins(AndroidApp)
android.useSupportVectors

versionCode in Android := Some(7)
versionName in Android := Some("1.0.10")
platformTarget in Android := "android-27"
minSdkVersion in Android :="16"
scalaVersion :="2.11.12"

val silencerVersion = "0.6"

resolvers ++= Seq(
    "Google Maven Repository" at "https://maven.google.com",
    "JitPack" at "https://jitpack.io"
)

libraryDependencies ++= Seq(
    "com.android.support" % "appcompat-v7" % "27.0.2",
    "com.android.support" % "design" % "27.0.2",
    "com.android.support.constraint" % "constraint-layout" % "1.1.0-beta4",
    "com.github.loloof64" % "chesslib" % "master",
    compilerPlugin("com.github.ghik" %% "silencer-plugin" % silencerVersion),
    "com.github.ghik" %% "silencer-lib" % silencerVersion
)
Just using versionCode in Android := Some(7) instead of versionCode := Some(7) and the same for other Android configurations
Also, I've already reloaded the project
laurent bernabé
@loloof64
Dec 31 2017 15:26
The generated Manifest is fine : so it has nothing to do with Scala build. Must really be a problem with my keystore.
Chenai Nakam
@chenakam
Dec 31 2017 17:16
@pfn But if i disable proguard, it works well.
Perry
@pfn
Dec 31 2017 17:47
then compare the generated bytecode to see what is missing
Chenai Nakam
@chenakam
Dec 31 2017 17:54
ok, i will try it.
laurent bernabé
@loloof64
Dec 31 2017 19:48
I think that my configuration for my project is wrong : running command ~/Android/Sdk/build-tools/26.0.2/aapt dump badging basicchessendgames-release.apk I've just seen that the version code is still 6 and version name remains "1.0.8". But I don't know how to fix it
Perry
@pfn
Dec 31 2017 20:11
you set it in manifest or build
laurent bernabé
@loloof64
Dec 31 2017 20:13
This is my build.sbt (project root directory)
enablePlugins(AndroidApp)
android.useSupportVectors

versionCode in Android := Some(7)
versionName in Android := Some("1.0.10")
platformTarget in Android := "android-27"
minSdkVersion in Android :="16"
scalaVersion :="2.11.12"

val silencerVersion = "0.6"

resolvers ++= Seq(
    "Google Maven Repository" at "https://maven.google.com",
    "JitPack" at "https://jitpack.io"
)

libraryDependencies ++= Seq(
    "com.android.support" % "appcompat-v7" % "27.0.2",
    "com.android.support" % "design" % "27.0.2",
    "com.android.support.constraint" % "constraint-layout" % "1.1.0-beta4",
    "com.github.loloof64" % "chesslib" % "master",
    compilerPlugin("com.github.ghik" %% "silencer-plugin" % silencerVersion),
    "com.github.ghik" %% "silencer-lib" % silencerVersion
)
I don't know why code version is still 6 : google play does not accept my apk and aapt badging command shows me that version code is 6
Perry
@pfn
Dec 31 2017 20:24
then you set it in manifest
laurent bernabé
@loloof64
Dec 31 2017 20:25
Yes, I try it right now : thanks :)
Perry
@pfn
Dec 31 2017 20:25
remove the version from manifest
laurent bernabé
@loloof64
Dec 31 2017 20:25
Ok :)
Yes it works :) Thanks again :)
I forgot that as we don't use Gradle build system, these properties must be set in Manifest
Perry
@pfn
Dec 31 2017 21:02
huh? if you have it set in manifest, it might override
laurent bernabé
@loloof64
Dec 31 2017 21:03
But when I use Sbt, the tool does not launch any gradle Daemon, right ?
Perry
@pfn
Dec 31 2017 21:03
it doesn't
laurent bernabé
@loloof64
Dec 31 2017 21:05
That's why I thought that these values have to be set in AndroidManifest.xml, also as setting them in build.sbt did not have effect
Perry
@pfn
Dec 31 2017 21:10
it does have effect
manifest overrode
laurent bernabé
@loloof64
Dec 31 2017 21:11
Ok
Perry
@pfn
Dec 31 2017 21:11
if it had no effect and you didn't set in manifest, you would get a build error
laurent bernabé
@loloof64
Dec 31 2017 21:12
Strange, in manifest I did not set any of those configurations.
Until I a few hours in order to force them
Perry
@pfn
Dec 31 2017 21:13
you set something, somewhere
laurent bernabé
@loloof64
Dec 31 2017 21:14
Maybe, not intentionnaly
Perry
@pfn
Dec 31 2017 21:45
sure