{"action":"created","issue":{"url":"https://api.github.com/repos/SecUpwN/Android-IMSI-Catcher-Detector/issues/147","labels_url":"https://api.github.com/repos/SecUpwN/Android-IMSI-Catcher-Detector/issues/147/labels{/name}","comments_url":"https://api.github.com/repos/SecUpwN/Android-IMSI-Catcher-Detector/issues/147/comments","events_url":"https://api.github.com/repos/SecUpwN/Android-IMSI-Catcher-Detector/issues/147/events","html_url":"https://github.com/SecUpwN/Android-IMSI-Catcher-Detector/issues/147","id":45565056,"number":147,"title":" Build: Automatic version and app name update with Gradle","user":{"login":"E3V3A","id":194392,"avatar_url":"https://avatars.githubusercontent.com/u/194392?v=3","gravatar_id":"","url":"https://api.github.com/users/E3V3A","html_url":"https://github.com/E3V3A","followers_url":"https://api.github.com/users/E3V3A/followers","following_url":"https://api.github.com/users/E3V3A/following{/other_user}","gists_url":"https://api.github.com/users/E3V3A/gists{/gist_id}","starred_url":"https://api.github.com/users/E3V3A/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/E3V3A/subscriptions","organizations_url":"https://api.github.com/users/E3V3A/orgs","repos_url":"https://api.github.com/users/E3V3A/repos","events_url":"https://api.github.com/users/E3V3A/events{/privacy}","received_events_url":"https://api.github.com/users/E3V3A/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/SecUpwN/Android-IMSI-Catcher-Detector/labels/BUILD","name":"BUILD","color":"0052cc"},{"url":"https://api.github.com/repos/SecUpwN/Android-IMSI-Catcher-Detector/labels/ENHANCEMENT","name":"ENHANCEMENT","color":"c7def8"}],"state":"open","locked":false,"assignee":{"login":"SecUpwN","id":6000299,"avatar_url":"https://avatars.githubusercontent.com/u/6000299?v=3","gravatar_id":"","url":"https://api.github.com/users/SecUpwN","html_url":"https://github.com/SecUpwN","followers_url":"https://api.github.com/users/SecUpwN/followers","following_url":"https://api.github.com/users/SecUpwN/following{/other_user}","gists_url":"https://api.github.com/users/SecUpwN/gists{/gist_id}","starred_url":"https://api.github.com/users/SecUpwN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SecUpwN/subscriptions","organizations_url":"https://api.github.com/users/SecUpwN/orgs","repos_url":"https://api.github.com/users/SecUpwN/repos","events_url":"https://api.github.com/users/SecUpwN/events{/privacy}","received_events_url":"https://api.github.com/users/SecUpwN/received_events","type":"User","site_admin":false},"milestone":null,"comments":19,"created_at":"2014-10-11T23:29:45Z","updated_at":"2015-05-03T20:42:02Z","closed_at":null,"body":"Implement automatic build and version updates when using Travis-CI and Gradle, to build our App. \r\nThe `build.gradle` script to do this, is described [HERE](http://bryankrosenbaum.com/2013/11/27/getting-to-know-gradle-auto-increment-version-and-signing-releases/), and lastest version can be found [HERE](https://github.com/bryanro/later-android/blob/master/Later/build.gradle). This would obviously require a few modifications in the *RegEx* as our build string is different, including changing the correct min/max of the supported API. (min=API-**17**, max=?) \r\n\r\n```xml\r\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n        package=\"com.SecUpwN.AIMSICD\"\r\n        android:versionCode=\"24\"\r\n        android:versionName=\"0.1.24-alpha-build-12\">\r\n```\r\n\r\nThe link above also provide a way to implement automatic APK signing, using a [signing.properties](https://github.com/bryanro/later-android/blob/master/signing.properties) file. \r\n\r\nAnd [HERE](http://toastdroid.com/2014/03/28/customizing-your-build-with-gradle/) is a way to automatically name the built APK. "},"comment":{"url":"https://api.github.com/repos/SecUpwN/Android-IMSI-Catcher-Detector/issues/comments/98541653","html_url":"https://github.com/SecUpwN/Android-IMSI-Catcher-Detector/issues/147#issuecomment-98541653","issue_url":"https://api.github.com/repos/SecUpwN/Android-IMSI-Catcher-Detector/issues/147","id":98541653,"user":{"login":"E3V3A","id":194392,"avatar_url":"https://avatars.githubusercontent.com/u/194392?v=3","gravatar_id":"","url":"https://api.github.com/users/E3V3A","html_url":"https://github.com/E3V3A","followers_url":"https://api.github.com/users/E3V3A/followers","following_url":"https://api.github.com/users/E3V3A/following{/other_user}","gists_url":"https://api.github.com/users/E3V3A/gists{/gist_id}","starred_url":"https://api.github.com/users/E3V3A/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/E3V3A/subscriptions","organizations_url":"https://api.github.com/users/E3V3A/orgs","repos_url":"https://api.github.com/users/E3V3A/repos","events_url":"https://api.github.com/users/E3V3A/events{/privacy}","received_events_url":"https://api.github.com/users/E3V3A/received_events","type":"User","site_admin":false},"created_at":"2015-05-03T20:42:02Z","updated_at":"2015-05-03T20:42:02Z","body":"@SecUpwN Hmm, I understand the manual fixing is working great, and that it is simpler. However, I'm not convinced this is very convenient for debugging. It mean we always have to manually change the name after each download/update, when saving, especially when I like to keep all previous versions for reference when trying to hunt down bugs. I often install and remove several versions on device for comparing. **What exactly is the problem with the previous build.script?** It's been working fine for me. In addition I'd like to keep the app name as short as possible, as I described [here](https://github.com/SecUpwN/Android-IMSI-Catcher-Detector/issues/147#issuecomment-61174231).\r\n\r\nI think the only reason the script is not automatically renaming the output, is because you previously insisted that all **builds** are published in a monotonically increasing sequence. (I.e. 1,2,3...) This is AFAIK not standard for development, and I don't see why we would want it to be like that. In any case before developer make a PR he should check/set the proper versioning anyway."}}