Skip to content
This repository was archived by the owner on Aug 31, 2019. It is now read-only.

Enable automatic signing for releases#477

Open
Anbranin wants to merge 13 commits intomasterfrom
build-test
Open

Enable automatic signing for releases#477
Anbranin wants to merge 13 commits intomasterfrom
build-test

Conversation

@Anbranin
Copy link
Contributor

@Anbranin Anbranin commented Oct 9, 2018

Updated the Android doc and some packages.

@Anbranin Anbranin requested a review from mboneil10 October 9, 2018 19:00
@Anbranin
Copy link
Contributor Author

Anbranin commented Oct 9, 2018

I need someone who has never worked on PVTA-multiplatform before (hasn't set it up on their current computer, in any case) to try out these instructions.
@Chauce, @jforgue or @avacmeyer I don't think any of you have worked on it. Any volunteers?

Copy link
Member

@werebus werebus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some suggestions.

### Android Studio
We use Android Studio to easily manage the Android SDK tools. If you wish, you can attempt
to download the tools separately, but these instructions will not help you because I found the
attempt maddening. Plus, Android Studio will keep track of updates for you, which is nice.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't too helpful in documentation.

1. `$brew install gradle`
1. Follow any additional commands to set Gradle up.

### Node
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no way you don't already have node installed if anything else works for you while developing the app. (i.e. ionic and cordova also need node to run).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These instructions should work for someone who was instructed to deploy the application and never worked on it, even though that's unlikely. Or someone whose computer crashed before they got to deploy.
I'm going to push back against assuming anything.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, but we have instructions for that here:

https://github.com/umts/pvta-multiplatform#prerequisites

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fiinnneneee

an emulator or phone: `$ionic cordova build android`.
1. If you have an Android: Plug it into the computer with a USB cable and enable USB
debugging. Side-load like so, replacing the paths with your own:
`~/Library/Android/sdk/platform-tools/adb install /Users/my_name/pvta-multiplatform/platforms/android/build/outputs/apk/debug/android-debug.apk
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to use placeholders here rather than full paths: <android_sdk>/platform_tools/adb install platforms/android/build/outputs/apk/debug/android-debug.apk

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I read that I'd be flummoxed by what that meant, but hopefully the people that read and use this have knowledge and minds more like yours and less like mine.

1. Now you can build a release APK that should be signed automatically:
`$ionic cordova build android --prod --release`
The terminal output should tell you your release location. If it's something like this:
`/platforms/android/build/outputs/apk/release/android-release.apk`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably no leading /.

my location was `/Users/my_name/Library/Android/sdk`

For "JAVA_HOME" problems, find the location of your JDK installation. My location
was `/Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home` and I don't know how
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure it's "jdk-11" Your instructions below seem to imply that you should be using Java 8 not Java 11.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or, you're saying that's what is was but not what it should have been?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woops I copied and pasted from a "failed examples" part of my running documentation. Fuxed

Copy link
Contributor

@mboneil10 mboneil10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General comments. Wasn't able to make it all the way through once, but I will at some point this week.

2. Open `config.xml`. On line 2, increment `android-versionCode` with your appropriately chosen new version number.
### Android Studio
We use Android Studio to easily manage the Android SDK tools. If you wish, you can attempt
to download the tools separately, but these instructions will not help you because I found the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can end the sentence here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I was trying to insert a little whimsy into an otherwise extremely dry document, but WHATEVER

attempt maddening. Plus, Android Studio will keep track of updates for you, which is nice.
1. Get [Android Studio](https://developer.android.com/studio/)
1. Use it to download the SDK platforms and tools:
1. Click menu items Android Studio -> Appearance and Behavior -> System Settings -> Android SDK
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of menu items, should we say Android Studio > Preferences > Appearance and Behavior ...? That's a bit clearer to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yeah I was totally unclear. I meant "click the menu items "This" -> "that" -> "this"", not "click a button called 'menu items'. Will change so that's clearer.

level 26, which we target at the moment.
1. Click on the "tools" tab. Make sure "Android SDK Platform Tools", "Android SDK Tools", and
"Android SDK Build Tools" are checked. If you don't have access to an Android phone, make sure
the Emulator is also installed. Click "apply"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably a job for someone who has never worked with pvtrack before, but I wonder if the emulator works.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea. Maybe I should take that part out, since I've never tried the emulator.

# Building an Android App to Deploy in Google Play

##### Steps
## Requirements
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth mentioning, also, that almost all of these requirements are documented here:

https://cordova.apache.org/docs/en/latest/guide/platforms/android/index.html

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be worth just linking to those instructions and these instructions:

https://cordova.apache.org/docs/en/latest/guide/platforms/ios/index.html

In the main readme rather than duplicating them here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh god. I'm so sad right now.

be downloaded separately, but these instructions do not cover how.
1. Get [Android Studio](https://developer.android.com/studio/)
1. Use it to download the SDK platforms and tools:
1. Navigate through these menu items:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these indentations four spaces long?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. You can actually tell from here if you highlight with your mouse.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants