0
0
mirror of https://github.com/schwabe/ics-openvpn.git synced 2024-09-19 19:42:29 +02:00

Allow to build a UI variant with OpenVPN 2.x only

This commit is contained in:
Arne Schwabe 2023-05-17 15:32:34 +02:00
parent d551053d55
commit a688889a1e
4 changed files with 23 additions and 5 deletions

View File

@ -7,7 +7,7 @@ jobs:
strategy:
fail-fast: false
matrix:
target: [Ui, Skeleton]
target: [UiOvpn23, SkeletonOvpn2, UiOvpn2]
name: "Release ${{ matrix.target }}"
runs-on: ubuntu-latest
steps:

View File

@ -15,7 +15,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:8.0.0")
classpath("com.android.tools.build:gradle:8.0.1")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
}
}

View File

@ -98,15 +98,27 @@ android {
}
}
}
flavorDimensions += listOf("implementation")
flavorDimensions += listOf("implementation", "ovpnimpl")
productFlavors {
create("ui") {
dimension = "implementation"
buildConfigField("boolean", "openvpn3", "true")
}
create("skeleton") {
dimension = "implementation"
}
create("ovpn23")
{
dimension = "ovpnimpl"
buildConfigField("boolean", "openvpn3", "true")
}
create("ovpn2")
{
dimension = "ovpnimpl"
versionNameSuffix = "-o2"
buildConfigField("boolean", "openvpn3", "false")
}
}

View File

@ -31,6 +31,7 @@ import androidx.fragment.app.Fragment;
import com.android.vending.billing.IInAppBillingService;
import de.blinkt.openvpn.BuildConfig;
import de.blinkt.openvpn.core.NativeUtils;
import org.json.JSONException;
import org.json.JSONObject;
@ -86,7 +87,12 @@ public class AboutFragment extends Fragment implements View.OnClickListener {
TextView osslVer = v.findViewById(R.id.openssl_version);
verO2.setText(String.format(Locale.US, "OpenVPN version: %s", NativeUtils.getOpenVPN2GitVersion()));
if (BuildConfig.openvpn3)
verO3.setText(String.format(Locale.US, "OpenVPN3 core version: %s", NativeUtils.getOpenVPN3GitVersion()));
else
verO3.setText("(OpenVPN 2.x only build. No OpenVPN 3.x core in this app)");
osslVer.setText(String.format(Locale.US, "OpenSSL version: %s", NativeUtils.getOpenSSLVersion()));