Add ExPlat implementation to :experimentation module - #114
Conversation
…le and :sampletracksapp build.gradle
…lintOptions from :AutomatticTracks to :experimentation build.gradle
| private val coroutineScope: CoroutineScope, | ||
| private val isDebug: Boolean | ||
| ) { | ||
| private val platform = Platform.WORDPRESS_ANDROID |
There was a problem hiding this comment.
I believe this should be declared by client
There was a problem hiding this comment.
Great catch! Thank you
| import com.automattic.android.experimentation.Experiment | ||
|
|
||
| @Suppress("unused") | ||
| class ExampleExperiment(exPlat: ExPlat) : Experiment(name = "example_experiment", exPlat = exPlat) |
There was a problem hiding this comment.
If it's not used anywhere, maybe we can remove it to not cause confusion?
| import java.util.Date | ||
|
|
||
| @ExperimentalCoroutinesApi | ||
| class ExPlatTest { |
There was a problem hiding this comment.
Thank you for implementing it @renanferrari 😁
| lintOptions { | ||
| baseline file("lint-baseline.xml") |
There was a problem hiding this comment.
As it's a new module, the baseline is not needed
| versionCode 1 | ||
| versionName "1.0" | ||
|
|
||
| testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" |
There was a problem hiding this comment.
As this module has no instrumentation tests, let's remove this to not add anything not needed.
…d.gradle, inject Platform field in ExPlat, update ExPlat unit tests
|
Thank you for the initial review @wzieba ! I've addressed your comments. Any ideas on why CI is complaining about |
|
@RenanLukas I'm investigating this issue, for this moment:
Either way this issue is not directly associated with your code changes. I believe it'd be awesome to fix it in a separate PR but ideally it'd be awesome to find a root cause - |
| } | ||
|
|
||
| android { | ||
| compileSdkVersion 32 |
There was a problem hiding this comment.
@RenanLukas generally, the core issue is that compileSdkVersion of this module, influenced which version of lint/lint rules will be used. So lowering it down to 30 will resolve the issue. I think the best will be to bump compileSdkVersion of both modules in a seperate PR.
Here is branch on which I was testing, see that build is passing on CI: https://github.com/Automattic/Automattic-Tracks-Android/compare/issue/112-extract-explat...issue/112-testing?expand=1
renanferrari
left a comment
There was a problem hiding this comment.
Thanks for handling this!
LGTM 🚢
Resolves #112
Copies ExPlat implementation from
WordPress-Androidso it can be used by other projects that depend onAutomattic-Tracks-Android.