Skip to content

Commit

Permalink
Merge pull request #3889 from getlantern/issue-3837
Browse files Browse the repository at this point in the history
Displaying same version information in Mobile as in Desktop
  • Loading branch information
atavism committed Mar 29, 2016
2 parents 7491f57 + 14d0e59 commit 29c5f03
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -574,14 +574,14 @@ $(LANTERN_MOBILE_ANDROID_SDK): $(ANDROID_SDK)
cp $(ANDROID_SDK) $(LANTERN_MOBILE_ANDROID_SDK)

$(LANTERN_MOBILE_ANDROID_DEBUG): $(LANTERN_MOBILE_TUN2SOCKS) $(LANTERN_MOBILE_ANDROID_LIB) $(LANTERN_MOBILE_ANDROID_SDK)
@gradle -PlanternVersion=$(GIT_REVISION) -b $(LANTERN_MOBILE_DIR)/app/build.gradle \
@gradle -PlanternVersion=$(GIT_REVISION) -PlanternRevisionDate=$(REVISION_DATE) -b $(LANTERN_MOBILE_DIR)/app/build.gradle \
clean \
assembleDebug

$(LANTERN_MOBILE_ANDROID_RELEASE): $(LANTERN_MOBILE_TUN2SOCKS) $(LANTERN_MOBILE_ANDROID_LIB) $(LANTERN_MOBILE_ANDROID_SDK)
@echo "Generating distribution package for android..."
ln -f -s $$SECRETS_DIR/android/keystore.release.jks $(LANTERN_MOBILE_DIR)/app && \
gradle -PlanternVersion=$$VERSION -b $(LANTERN_MOBILE_DIR)/app/build.gradle \
gradle -PlanternVersion=$$VERSION -PlanternRevisionDate=$(REVISION_DATE) -b $(LANTERN_MOBILE_DIR)/app/build.gradle \
clean \
assembleRelease && \
cp $(LANTERN_MOBILE_ANDROID_RELEASE) lantern-installer.apk;
Expand Down
4 changes: 1 addition & 3 deletions src/github.com/getlantern/lantern-mobile/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ android {
targetSdkVersion rootProject.targetSdkVersion
applicationId "org.getlantern.lantern"
versionCode code
versionName "1.0." + nowFormatted
versionName "$project.lanternVersion ($project.lanternRevisionDate)"
}

lintOptions {
Expand Down Expand Up @@ -55,8 +55,6 @@ android {

applicationVariants.all { variant ->

variant.buildConfigField "String", "LANTERN_VERSION", "\"$project.lanternVersion\""

variant.outputs.each { output ->
output.outputFile = new File(
output.outputFile.parent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ protected void onCreate(Bundle savedInstanceState) {
String appVersion = pInfo.versionName;
Log.d(TAG, "Currently running Lantern version: " + appVersion);

LanternUI.setVersionNum(appVersion, BuildConfig.LANTERN_VERSION);
LanternUI.setVersionNum(appVersion);
LanternUI.setupLanternSwitch();
} catch (Exception e) {
Log.d(TAG, "Got an exception " + e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ interface Command {
void runCommand();
}

public void setVersionNum(final String appVersion, final String lanternVersion) {
versionNum.setText(String.format("%s-%s", appVersion, lanternVersion));
public void setVersionNum(final String version) {
versionNum.setText(version);
}

public void setupSideMenu() throws Exception {
Expand Down Expand Up @@ -396,7 +396,6 @@ public boolean useVpn() {
return mPrefs.getBoolean(LanternConfig.PREF_USE_VPN, false);
}


// update START/STOP power Lantern button
// according to our stored preference
public void setBtnStatus() {
Expand Down

0 comments on commit 29c5f03

Please sign in to comment.