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

22nd
Jul 2016
VyacheslavMik
@VyacheslavMik
Jul 22 2016 11:23
Oh, thanks. It's very useful.
Anyone know how properly compile project with .org.apache.http.legacy depencency?
Rafal Wachol
@charafau
Jul 22 2016 11:24
good question
I didnt think of it :)
I will look later
VyacheslavMik
@VyacheslavMik
Jul 22 2016 11:25
I'm trying to add licensing in my project, but fail.:(
Rafal Wachol
@charafau
Jul 22 2016 11:26
stacktrace
VyacheslavMik
@VyacheslavMik
Jul 22 2016 11:26
It wery long.:)
I'm copy org.apache.http.legacy in my-project/lib. Project compiled, but proguard step fail.
Note: there were 40 duplicate class definitions.
(http://proguard.sourceforge.net/manual/troubleshooting.html#duplicateclass)
Warning: there were 16 instances of library classes depending on program classes.
You must avoid such dependencies, since the program classes will
be processed, while the library classes will remain unchanged.
(http://proguard.sourceforge.net/manual/troubleshooting.html#dependency)
[trace] Stack trace suppressed: run 'last android:proguard' for the full output.
Rafal Wachol
@charafau
Jul 22 2016 11:31
why do you need apache http anyway ?
is it new project
or old
VyacheslavMik
@VyacheslavMik
Jul 22 2016 11:35
New. I try add licensing in project by this guide https://developer.android.com/google/play/licensing/adding-licensing.html. One of dependency of it is a org.apache.http.
Rafal Wachol
@charafau
Jul 22 2016 11:36
I have no experience with that
maybe @pfn will help
VyacheslavMik
@VyacheslavMik
Jul 22 2016 11:37
Ok, thanks.:)
May be you know how to transform this android { compileSdkVersion 23 buildToolsVersion "23.0.0" useLibrary 'org.apache.http.legacy' ... }
to sbt configuration?
Particlular I'm intersting in this useLibrary 'org.apache.http.legacy' part.
Rafal Wachol
@charafau
Jul 22 2016 11:38
I know
I mean I know what you want to do
VyacheslavMik
@VyacheslavMik
Jul 22 2016 11:39
What?
so you want...
useLibrary in Android := "org.apache.http.legacy"
VyacheslavMik
@VyacheslavMik
Jul 22 2016 11:42
Sorry for stupid questions, but I receive this error error: not found: value useLibrary useLibrary in Android := "org.apache.http.legacy" ^ [error] Type error in expression
I'm new in scala and sbt.:)
Rafal Wachol
@charafau
Jul 22 2016 11:45
there are no stupid questions
I probably got it wrong :)
VyacheslavMik
@VyacheslavMik
Jul 22 2016 11:56
This work android.dsl.useLibrary("org.apache.http.legacy"). Thanks!
Rafal Wachol
@charafau
Jul 22 2016 12:00
hmm
there should be better way to access this
but good to know that it works for you
VyacheslavMik
@VyacheslavMik
Jul 22 2016 12:12
Something like this useLibrary in Android := "org.apache.http.legacy"?
Rafal Wachol
@charafau
Jul 22 2016 12:15
yes, but it doesnt work for me either
VyacheslavMik
@VyacheslavMik
Jul 22 2016 12:16
If I'll find a solution, I write it here.
Rafal Wachol
@charafau
Jul 22 2016 12:16
pfn knows how it works, so he will reply :)
I'm new to this plugin and sometimes I got confused
VyacheslavMik
@VyacheslavMik
Jul 22 2016 12:17
Many thanks to your help!:)
Rafal Wachol
@charafau
Jul 22 2016 12:17
no problem, spread the word about scala on android
Perry
@pfn
Jul 22 2016 14:22
nah, the dsl.useLibrary is best
VyacheslavMik
@VyacheslavMik
Jul 22 2016 14:23
Why?
Perry
@pfn
Jul 22 2016 14:24
simpler syntax
VyacheslavMik
@VyacheslavMik
Jul 22 2016 14:24
It's not idiomatic for sbt build config.:)
Perry
@pfn
Jul 22 2016 14:24
you can do libraryRequests += (("org.apache.http.legacy", true)) instead
VyacheslavMik
@VyacheslavMik
Jul 22 2016 14:25
Oh, thanks!
By the way, your work is great! I appreciate you for your plugin.
Perry
@pfn
Jul 22 2016 14:30
you're welcome
Rafal Wachol
@charafau
Jul 22 2016 19:22
https://github.com/wireapp/wire-android looks like wire has gradle plugin or scala
Rafal Wachol
@charafau
Jul 22 2016 20:54
ok it's just old plugin code
doesnt work with gradle plugin 2.0.0