https://kotlinlang.org logo
Title
d

dave08

12/12/2018, 5:48 AM
Is gradle 5.0.0 and kotlin dsl supported in android studio 3.2?
g

gildor

12/12/2018, 5:58 AM
Yes, but Idea 2018.1 (on which AS 3.2 is based) has a lot of tooling problems with Kotlin DSL not even related to Gradle 5.0, but in general Kotlin DSL is supported UPD: Gradle 5 is not supported in 3.2
s

Slava Glushenkov

12/12/2018, 6:44 AM
If you are using Gradle for Android, you need to move to version 3.4 or higher of both the Android Gradle Plugin and Android Studio. https://docs.gradle.org/5.0/userguide/upgrading_version_4.html
👍 1
g

gildor

12/12/2018, 6:47 AM
3.3 acutally works with Gradle 5
d

dave08

12/12/2018, 7:16 AM
Is it stable enough to use for production apps? Should I just use Intellij Ultimate (I heard the support for android isn't great without AS?)
g

gildor

12/12/2018, 7:37 AM
Yes, we use 3.3 without issues, it’s already rc1, rc2 is comming
👍🏼 1
Depends on your use case. What do you actually want to use?
d

dave08

12/12/2018, 7:39 AM
A multiproject android app with a combination of spek 1.x and junit 4.12 unit tests, they haven't been working together yet... but at least with kotlin dsl I might get docs and hints to see where my configs are wrong...
g

gildor

12/12/2018, 7:41 AM
they haven’t been working together yet
they? Do you mean spek and junit 4? Isn’t Spek based on Junit-Platform
d

dave08

12/12/2018, 7:41 AM
Spek tests run junit 4 reports empty test suite...
Yes i'm using the latest junit together with 4.12 support
If I put includeEngine 'spek', 'junit...' in configs nothing works, I remove both, only spek works 🤔
g

gildor

12/12/2018, 7:46 AM
not sure about Spek, I always though that Spek uses Junit 5 API to run own tests
d

dave08

12/12/2018, 7:46 AM
Any known problems with 3.3 in my case?
g

gildor

12/12/2018, 7:47 AM
I don’t know any particular ones
d

dave08

12/12/2018, 7:48 AM
I think it does, I used the install instructions from its docs... I really want to migrate out of it, but with this problem I'm forced to keep on writing new spek tests
Is there a way to create another test module in android, one for spek and the other for junit?
g

gildor

12/12/2018, 7:51 AM
Yes, why not? Just create a new module only with tests and add module that should be tested as dependency, but you cannot test
internal
declarations in this case
Also maybe you can just configure test runner for spek and junit4 to use diffferent source paths or something like that
d

dave08

12/12/2018, 7:54 AM
I tried putting the RunWith Junit annotation on the junit test class, still no go... where/how could I configure the test runner like that? Any docs on this, I searched alot and couldn't find anything (but then I'm no gradle expert...)
g

gildor

12/12/2018, 8:09 AM
You can configure runner using Gradle Test tasks, see docs, have no particular advices in this case, maybe better to ask in #spek