New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MBL-11865: Initial inclusion of android espresso and docs automation dirs #1

Merged
merged 2 commits into from Jan 10, 2019

Conversation

Projects
None yet
3 participants
@joehoag
Copy link
Contributor

joehoag commented Jan 9, 2019

I tried to make it as minimalistic as possible. I would assume that the main thing that you would want to look at would be build.gradle and other configuration-related files. All actual code files have been copied verbatim from android-uno.

@CLAassistant

This comment has been minimized.

Copy link

CLAassistant commented Jan 9, 2019

CLA assistant check
All committers have signed the CLA.

@joehoag joehoag requested a review from bootstraponline Jan 9, 2019

apply plugin: 'kotlin-android'

// Borrowed from http://stackoverflow.com/questions/17097263/automatically-versioning-android-project-from-git-describe-with-android-studio-g
def getVersionCode = {

This comment has been minimized.

@joehoag

joehoag Jan 9, 2019

Contributor

My attempt at automatically producing a version number.

This comment has been minimized.

@bootstraponline

bootstraponline Jan 10, 2019

Member

we may want to consistently use the commit hash, I'm not sure there's an easy way to resolve build numbers to git commits.

This comment has been minimized.

@joehoag

joehoag Jan 10, 2019

Contributor

This has worked for me in the past. And commit hashes wouldn't be ordered, right?

This comment has been minimized.

@joehoag

joehoag Jan 10, 2019

Contributor

I guess that my thinking is that we'll tag each bitrise build with the bitrise build number, and that will be used to identify whatever we push to jitpack. I suppose that we could manually maintain the build number, like we do with our canvas apps, but I'd like to see if this works.

This comment has been minimized.

@bootstraponline

bootstraponline Jan 10, 2019

Member

The hash becomes the build number. Checkout how Java projects publish snapshots on jitpack. It's usually something like Flank-master-f40414091f-1.jar

This comment has been minimized.

@bootstraponline

bootstraponline Jan 10, 2019

Member

And commit hashes wouldn't be ordered, right?

they're ordered in the git history, that's about it. GitHub will show you how many commits behind a commit is.

This comment has been minimized.

@joehoag

joehoag Jan 10, 2019

Contributor

Apologies for my slowness, but how is that better than Flank-master-1, Flank-master-2, Flank-master-3, ...?

This comment has been minimized.

@bootstraponline

bootstraponline Jan 10, 2019

Member

let's chat more on Slack, I think there are a few reasons why that's not common practice on jitpack.

org.gradle.jvmargs=-Xmx2560M
org.gradle.caching=true
android.useAndroidX=true
android.enableJetifier=true

This comment has been minimized.

@joehoag

joehoag Jan 9, 2019

Contributor

Lines 3 and 4 did the jetifier thing. I'm hoping that this works in bitrise as well as Android Studio.

This comment has been minimized.

@bootstraponline

bootstraponline Jan 10, 2019

Member

yep it should work

@joehoag

This comment has been minimized.

Copy link
Contributor

joehoag commented Jan 10, 2019

It looks like bitrise needs the gradle wrapper to be present. Maybe I should un-ignore gradle/ and gradlew*?

@bootstraponline

This comment has been minimized.

Copy link
Member

bootstraponline commented Jan 10, 2019

Yeah, the Gradle wrapper is what bitrise calls


buildscript {
// Define this once here because it will need to be reused later
ext.kotlinVersion = "1.2.70"

This comment has been minimized.

@bootstraponline

bootstraponline Jan 10, 2019

Member

this version of kotlin is now quite old, we'll want to update to the latest stable

This comment has been minimized.

@joehoag

joehoag Jan 10, 2019

Contributor

Does that mean that we would want to up-version Kotlin in android-uno as well, to keep the versions in sync?

This comment has been minimized.

@bootstraponline

bootstraponline Jan 10, 2019

Member

Ideally yes, we'd want android-uno on the latest Kotlin version. Upgrading android-uno is typically more challenging because there's a lot of code.

We should be able to use the newer version on this lib and still use it from an older Kotlin in android-uno.

apply plugin: 'kotlin-android'

// Borrowed from http://stackoverflow.com/questions/17097263/automatically-versioning-android-project-from-git-describe-with-android-studio-g
def getVersionCode = {

This comment has been minimized.

@bootstraponline

bootstraponline Jan 10, 2019

Member

we may want to consistently use the commit hash, I'm not sure there's an easy way to resolve build numbers to git commits.

}

def _compileSdkVersion = getProperty('compileSdkVersion', 26)
def _buildToolsVersion = getProperty('buildToolsVersion', '28.0.3')

This comment has been minimized.

@bootstraponline

bootstraponline Jan 10, 2019

Member

these getProperty calls can all be removed, they're legacy code.

//
// https://maven.google.com/com/android/support/test/espresso/espresso-core/3.0.0/espresso-core-3.0.0.pom

def runnerVersion = "1.1.0-beta01"

This comment has been minimized.

@bootstraponline

bootstraponline Jan 10, 2019

Member

these versions look out of date, there should be new versions for the espresso dependencies

This comment has been minimized.

@joehoag

joehoag Jan 10, 2019

Contributor

This is what we had defined in our android-uno Versions object. I'll look around to see if there are better/newer versions. (Note that the Android Studio is not complaining that there versions are out of date, as it seems to normally do.)

This comment has been minimized.

@bootstraponline

bootstraponline Jan 10, 2019

Member

(Note that the Android Studio is not complaining that there versions are out of date, as it seems to normally do.)

right, it won't do that for any dynamically defined versions.

This comment has been minimized.

@bootstraponline
org.gradle.jvmargs=-Xmx2560M
org.gradle.caching=true
android.useAndroidX=true
android.enableJetifier=true

This comment has been minimized.

@bootstraponline

bootstraponline Jan 10, 2019

Member

yep it should work

MBL-11865: Addressed PR feedback.
- Un-ignored gradle wrapper files
- Upgraded versions of some espresso/kotlin libraries
- Removed some obsolete code from build.gradle.
- Removed build versioning logic from build.gradle.

@joehoag joehoag merged commit f5aa9f9 into master Jan 10, 2019

1 check passed

license/cla Contributor License Agreement is signed.
Details

@joehoag joehoag deleted the MBL-11865 branch Jan 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment