Skip to content

Commit

Permalink
get version from gradle file
Browse files Browse the repository at this point in the history
  • Loading branch information
eycorsican committed Feb 23, 2019
1 parent 912f796 commit da90929
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
applicationVariants.all { variant ->
variant.resValue "string", "coreName", "4.17.0"
variant.resValue "string", "versionName", variant.versionName
}
productFlavors {
}
}
Expand Down
8 changes: 7 additions & 1 deletion app/src/main/res/xml/preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@
<Preference
app:key="core_version"
app:title="Core Version"
app:summary="4.17.0"
app:summary="@string/coreName"
app:iconSpaceReserved="false"/>

<Preference
app:key="app_version"
app:title="Version"
app:summary="@string/versionName"
app:iconSpaceReserved="false"/>
</PreferenceScreen>

0 comments on commit da90929

Please sign in to comment.