Skip to content

Commit

Permalink
Handle UI version (#22)
Browse files Browse the repository at this point in the history
- Move version info definition into properies file
- Pass ui version info for GO
  • Loading branch information
pappz authored May 31, 2024
1 parent 4e74f51 commit ce4bac2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ android {
applicationId "io.netbird.client"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 23
versionName "0.0.21"
versionCode project.versionCode.toInteger()
versionName project.versionName
}

splits {
Expand Down
5 changes: 4 additions & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,7 @@ newArchEnabled=false

# Use this property to enable or disable the Hermes JS engine.
# If set to false, you will be using JSC instead.
hermesEnabled=true
hermesEnabled=true

versionCode=9999
versionName=development
3 changes: 3 additions & 0 deletions android/tool/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ android {

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"

buildConfigField "int", "VERSION_CODE", project.versionCode
buildConfigField "String", "VERSION_NAME", "\"${project.versionName}\""
}

buildTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ class EngineRunner {
public EngineRunner(VPNService vpnService) {
context = vpnService;
NetworkChangeNotifier notifier = new NetworkChangeNotifier(vpnService);

IFace iFace = new IFace(vpnService);
goClient = Android.newClient(
Preferences.configFile(vpnService),
DeviceName.getDeviceName(),
BuildConfig.VERSION_NAME,
iFace,
new IFaceDiscover(),
notifier);
Expand Down

0 comments on commit ce4bac2

Please sign in to comment.