Conversation
|
I've created a branch but is still unstable, have a look if you want |
|
@niqdev I will have a look! |
|
Sorry, I pressed the button accidentally |
|
@amadeu01 can you please resolve the conflicts? |
| allprojects { | ||
| group = 'com.github.niqdev' | ||
| version = '1.3.2' | ||
| version = '1.3.3' |
There was a problem hiding this comment.
please revert this, I will change it when release the lib
There was a problem hiding this comment.
Actually, It could be done by gradle task.
def getVersionCode = { ->
try {
def code = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-list', 'HEAD', '--count'
standardOutput = code
}
return Integer.parseInt(code.toString().trim())
} catch (exception) {
return "1";
}
}
// Version name is Last Tag Name + No. of commits form last Tag + short git sha
def getVersionName = { ->
try {
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'describe', '--tags', '--dirty'
standardOutput = stdout
}
return stdout.toString().trim()
} catch (exception) {
return "0.0.0.1";
}
}
// Use
android{
defaultConfig {
...
versionCode getVersionCode()
versionName getVersionName()
...
}
}There was a problem hiding this comment.
nice, so to use it properly i need to tag it just before release the lib i.e. ./gradlew build bintrayUpload. correct? can you add it in a different PR unless you think is going to be different in #59?
There was a problem hiding this comment.
hi @niqdev
I will do another PR, for that change.
There was a problem hiding this comment.
Right, this should be set automatically.
| urlConnection.setRequestProperty("Connection", "close"); | ||
| } | ||
|
|
||
| if (urlConnection.getResponseCode() == HttpURLConnection.HTTP_UNAUTHORIZED && !TextUtils.isEmpty(username) && !TextUtils.isEmpty(password)) { |
There was a problem hiding this comment.
if is worth it, maybe extract it in a method and add comment for why is needed, otherwise is fine.
The important thing is that it must be retrocompatible
There was a problem hiding this comment.
Agreed, I will do it later. Thanks for your feedback
|
@niqdev sorry for my delay, I’ll update it as soon as I got some free time. Thanks ! |
|
Please rebase it to recent master |
I had a problem that the Camera URL use some digest authentication. So, I included a library for handle this kind of authentication, for more information about the dependency included here. It simply handles the digest authentication throughout HTTP when it is needed.