Change Android Vendor to ADAM in Gradle configuration
See original GitHub issueI want to switch to ADAM Vendor using the Gradle configurationo but I can’t achieve it due to this error:
Caused by: groovy.lang.MissingPropertyException: Could not get unknown property 'com' for extension 'marathon' of type com.malinskiy.marathon.MarathonExtension.
How can I import the vendor into the Marathon config? What am I missing?
My files:
root/settings.gradle
pluginManagement {
repositories {
google()
mavenCentral()
maven { url 'https://dl.bintray.com/qameta/maven' }
gradlePluginPortal()
}
resolutionStrategy {
eachPlugin {
if (requested.id.id == "marathon") {
useModule("com.malinskiy.marathon:marathon-gradle-plugin:0.6.0")
}
}
}
}
[...]
root/build.gradle
buildscript {
repositories {
[...]
}
dependencies {
classpath "com.malinskiy.marathon:marathon-gradle-plugin:0.6.0"
[...]
}
}
[...]
root/app/build.gradle
apply plugin: 'marathon'
marathon {
vendor = com.malinskiy.marathon.android.VendorType.ADAM // <----
[...]
}
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Configure your build
Each build configuration can define its own set of code and resources while reusing the parts common to all versions of your app....
Read more >marathon/build.gradle.kts at develop
Cross-platform test runner written for Android and iOS projects - marathon/build.gradle.kts at ... import com.malinskiy.marathon.config.vendor.android.
Read more >Android - Marathon
To indicate to CLI that you're using a vendor config for android you have to specify the type in the root of the...
Read more >Gradle
Gradle is a build automation tool for multi-language software development. It controls the development process in the tasks of compilation and packaging to ......
Read more >Understanding resource conflicts in Android
In our app module we need to be able to resolve a unique resource for the combination of type, name and device configuration....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@asos-jorgegonzalez glad you’ve found a way, but a small reminder that you don’t need to gradle’s internal object factory with reflection to instantiate classes in Groovy, simple
newis enough:https://github.com/Malinskiy/marathon/blob/test/440/sample/android-app/app/build.gradle#L34
Cheers
I’ve tried to reproduce your problem and failed. https://github.com/Malinskiy/marathon/tree/test/440
This correctly recognizes the adam module and executes the tests: https://github.com/Malinskiy/marathon/blob/test/440/sample/android-app/app/build.gradle#L28
I’m not sure where you are applying the plugin, but it definitely shouldn’t be the root gradle. Wherever you apply the application/library android plugin - the marathon apply block should be also there.
Also you don’t need
This should be picked up by gradle automatically