Office Hours — Today, March 11

Tuesday, March 9

Mar 11
7:20 PM
Mark M.
has entered the room
Mark M.
turned on guest access
7:30 PM
Scott W.
has entered the room
Scott W.
hello Mark
Mark M.
hello, Scott!
how can I help you today?
more Maven madness?
Scott W.
I've got a few more android library distribution questions
mostly out of Maven
first question is kinda maven
Is the library consuming app responsible for declaring all of the repositories needed by the library?
Mark M.
yes
7:35 PM
Mark M.
for your own libraries, the consuming app will already have your Maven repo configured to pull in the main library, and so transitive dependencies to pull in the other six should be taken care of
Scott W.
right
this one that I was worried about
Mark M.
yeah, you'll need to tell your customers to add that one, as probably few have it already
Scott W.
so we'll have to tell our customers to include this as well.
Mark M.
yes
Scott W.
ok cool
next up are some gradle questions
I want to still use my local modules when developing.
so I'm thinking of putting some if statement in my dependencies for switching between local modules and maven repos
Mark M.
or, you can use debugImplementation and releaseImplementation instead of just plain ordinary implementation
(I *so* wish this chat had Markdown support...)
Scott W.
yeah that'd be nice
releaseImplementation 'com.hlsdk:1.0.0'
debugImplemenation project('hlsdk')
something like this?
Mark M.
it would be project(':hlsdk'), but otherwise, yes
Scott W.
yeah
Mark M.
your debug builds pull in the module, and your release builds go to the repository
7:40 PM
Mark M.
this is somewhat limiting, in that you can't do a debug build off the repository library and you can't do a release build off the module, but those may be infrequent enough that occasional manual fiddling with Gradle can cover those
Scott W.
right
Mark M.
you could also add other build types if you really want easy access to three or all four of the combinations
Scott W.
so before all of this maven work, the app module pulled in all of the library modules.
is that required?
Mark M.
it shouldn't be
Scott W.
hmm
I spent a lot of time on that, but it was like 2 years ago.
Mark M.
if we stick with the debug/release system we were just discussing, the release builds will hit the repository and use its POM, and transitive dependencies should then work (and if not, you have problems)
Scott W.
yes the release build works. I've tested this.
I'm just wondering if the debug build will work if I only define the main module as a dependency.
Mark M.
yeah, I'm now trying to think through how the debug builds work with the project(":...") bits, and to be honest, I forget whether that pulls in all transitive dependencies or only the api ones
7:45 PM
Mark M.
so, it's possible you will need a few debugImplementation lines and only one releaseImplementation
it's been a while since I dealt with that particular problem
Scott W.
ok so debugImplementation with no matching releaseImplementation means the dependency will be ignored for release builds?
Mark M.
correct
Scott W.
ok moving on...
I use Timber for logging
with Timber, you have plant a tree to activate the logging
this planting is surrounded by an if checking for debuggable build type
But, if the consuming app also uses Timber, and they plant a little tree, will all of my debug statements start popping up?
Mark M.
your BuildConfig will be tied to your own project -- you will see that in your import statement
and that will be compiled into your library, with whatever value of DEBUG it has as part of your build process
that will be unaffected by the configuration of the hosting app
Scott W.
that's great
when does this file get made?
7:50 PM
Mark M.
BuildConfig? when you, um, build :-)
it is code-generated as part of each build, based on the Gradle settings for your build variant
Scott W.
so syncing the project with gradle files won't update this
Mark M.
not directly -- if you changed the Gradle settings for the build variant, that will take effect on your next build of that variant
Scott W.
makes sense.
I think I ran into an answer of yours about android gradle plugin removing VERSION_NAME from libraries
Mark M.
yes, that sounds familiar
Scott W.
a few days I hit this "bug"
Mark M.
Scott W.
yeah that's the one
I feel like there are a billion little gotchyas with giving someone an Android library to use that I will find out the hard way.
which brings to the next topic
I'm turning on minify for the first time for this project
first time ever really.
7:55 PM
Scott W.
no specific question in my mind yet, but I'm not sure I'm doing this right.
Mark M.
you will want to configure your "ProGuard" rules to ensure that your public API is kept intact (no removals, no obfuscation)
otherwise, your library will be very tiny
you will need to decide whether or not to obfuscate the rest
Scott W.
it has made me realize that I've got a lot of classes mixing public and private stuff.
boss required this specifically for obfuscation
Mark M.
that's fairly typical, if you are referring to visibility modifiers
Scott W.
so I'm turning off shrink in most of the modules.
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
proguard-android-optimize.txt is this provided somewhere?
Mark M.
it should be in the Android SDK somewhere, probably in a tools directory
Scott W.
ok
Mark M.
note that obfuscation may make it difficult for you to provide technical support for your customers, insofar as you may have challenges deobfuscating any stack traces they hand to you
Scott W.
yeah I'll need to read through the developer article on this.
For our own app at least, I can provide the play store with a deobfuscated build or something
8:00 PM
Scott W.
I'll have to worry about that later.
8:00 PM
Mark M.
there are ways to upload the mapping file to teach the Play Store or other tools how to deobfuscate
however, that implies that those tools are the ones with the stack trace, which will not be the case for your technical support inquiries
you can't obfuscate the public APIs, as otherwise your customer can't use them, but the private calls made by those APIs will be obfuscated
there's probably a mechanism to deal with this
personally, I don't obfuscate, partly because decompilers are really quite good, and partly because just about everything that I do is open source anyway
Scott W.
yeah...
I had to request an obfuscation approval today
I didn't know how mangled they wanted it to look.
seems like a waste of time to me.
all right I've got some different types of questions
I've recently taken on 3 new team members.
Mark M.
wow
Scott W.
so, my Android team went from 1 to 4.
Mark M.
like, seriously wow
8:05 PM
Scott W.
well we added 1 in November, 1 in January, and the last came on in February.
what is shocking about it?
Mark M.
finding Android developer talent can be a challenge
Scott W.
well that's the problem I think
all these guys are through a contracting company
they all have Android development on their resumes, but a lot of that is Unity development ported to Android
Mark M.
that... doesn't sound promising
Scott W.
They have some experience
Mark M.
(nothing against Unity, but that's a whole different ball of wax than ordinary Android app development)
Scott W.
but, I mean I gave the 3 of them this maven AWS hosting task on a Monday. I ended just doing it myself at the end of the week.
yeah I know
I started my programming career in Unity
So, I feel like I ask you some pretty basic Android dev questions
and these guys are asking me waaaay simpler questions
Mark M.
the questions you have had on Maven artifact hosting aren't particularly basic, insofar as only a small fraction of developers ever need to do it
8:10 PM
Mark M.
tell 'em you know where they can get some really good books :-)
Scott W.
haha
I've been thinking about that
Like, giving them tasks to educate themselves.
This one guy spent all week on something that took me 15 minutes to do
I just don't know if it's worth my time to manage that.
Mark M.
that's really a conversation to have between you and your boss (and perhaps whoever arranged for these people to join)
Scott W.
so, the first two guys were just brought on without my input.
Mark M.
contractors aren't all bad... considering that when I do consulting, that's effectively my role
Scott W.
Do you have any tips for finding a good Android developer?
Mark M.
I wish
my current primary client is looking for Android developers
and I'm like "damn, I remember training about a thousand of them... where'd they all go?"
Scott W.
what's the deal?
haha
every job I see around me is for web dev
or react native or something like that
8:15 PM
Mark M.
my client is using professional recruiters, and even they are having a rough time finding people
Scott W.
I do get recruiter emails and linkedin messages all the time
I've got a special filter where they go to die
I've only ever worked professionally for this company.
programming anyway
and I was the first Android developer for them
and they hired me when I had 0 experience.
Mark M.
getting back to your problem: if the answer is that you are stuck with the contractors, you may need to do what you hinted, and specially develop a series of tasks that are at least somewhat useful but will mostly be there for on-the-job training
Scott W.
I've always felt in the dark about Android development and what I should know.
Mark M.
but, IMHO, you really need to ensure that your boss understands the level of ineffectiveness that you are seeing
8:20 PM
Scott W.
true, but is there another option you know?
I didn't know it was so hard to find Android developers
Mark M.
besides not having the contractors and saving the money?
refresh my memory: are you a Java or Kotlin shop?
Scott W.
java
Mark M.
OK, that eliminates some suggestions...
Scott W.
I've started sneaking Kotlin in
Mark M.
I don't know how your firm does its hiring and recruitment (e.g., is there an HR department that handles it)
Scott W.
uhh kind of?
if there is it's very new
and 1 person
Mark M.
but there smaller places to advertise available positions, where by "smaller" I mean "not Indeed.com" and other large dedicated job sites
for example, /r/androiddev on Reddit has a weekly hiring thread, such as https://www.reddit.com/r/androiddev/comments/m0...
the droidcon folks have a job site: https://jobs.droidcon.com/employers/
8:25 PM
Scott W.
I think I will suggest doing a search myself and letting one or two of these guys go.
Mark M.
Hacker News has job listings, where https://hnhiring.com/technologies/android is a scraped copy of the current Android ones
I'm not somebody who hires talent, so I can't say how well those sorts of smaller sites work, but they may be worth a shot
Scott W.
Yeah I'll give it a go.
It's my time to leave. This has been a really helpful conversation. Sorry if it was a bit off the rails.
Mark M.
recruiting isn't exactly my department, but, then again, neither is AWS Maven hosting :-)
but, I'm happy to try to help!
Scott W.
all right now. Have a good night!
Mark M.
you too!
8:30 PM
Scott W.
has left the room
Mark M.
turned off guest access

Tuesday, March 9

 

Office Hours

People in this transcript

  • Mark Murphy
  • Scott Wehby