[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [orbot/master] move libs.versions.toml to dependencies.gradle



commit 57add48cd904afe94363219887cd142bb5cf6696
Author: n8fr8 <nathan@xxxxxxxxxxxxxxxxxxxx>
Date:   Tue Oct 26 16:11:12 2021 -0400

    move libs.versions.toml to dependencies.gradle
    makes it easier to work with in Android Studio
---
 app-mini/build.gradle                              | 17 ++++---
 app-tv/build.gradle                                | 16 ++----
 app/build.gradle                                   | 25 +++++-----
 .../android/ui/onboarding/MoatActivity.java        |  2 +-
 appcore/build.gradle                               |  3 +-
 build.gradle                                       |  1 +
 commons.gradle                                     |  1 +
 dependencies.gradle                                | 54 ++++++++++++++++++++
 gradle/libs.versions.toml                          | 57 ----------------------
 intentintegrator/build.gradle                      |  2 +-
 orbotservice/build.gradle                          | 17 ++++---
 .../torproject/android/service/OrbotService.java   |  2 +-
 settings.gradle                                    |  3 +-
 13 files changed, 98 insertions(+), 102 deletions(-)

diff --git a/app-mini/build.gradle b/app-mini/build.gradle
index e861fb41..8b961574 100644
--- a/app-mini/build.gradle
+++ b/app-mini/build.gradle
@@ -1,4 +1,5 @@
 apply from: "../commons-device.gradle"
+apply from : '../dependencies.gradle'
 
 android {
     defaultConfig {
@@ -33,14 +34,14 @@ android {
                 project(path: ':appcore'),
                 project(path: ':intentintegrator'),
                 project(':orbotservice'),
-                libs.android.material,
-                libs.androidx.coordinator.layout,
-                libs.androidx.localbroadcast,
-                libs.androidx.palette,
-                libs.androidx.recyclerview,
-                libs.apl.appintro,
-                libs.guardian.jtorctl
+                libs.android_material,
+                libs.androidx_coordinator,
+                libs.androidx_localbroadcast,
+                libs.androidx_palette,
+                libs.androidx_recyclerview,
+                libs.apl_appintro,
+                libs.guardian_jtorctl
         )
-        androidTestImplementation libs.fastlane.screengrab
+        androidTestImplementation libs.fastlane_screengrab
     }
 }
diff --git a/app-tv/build.gradle b/app-tv/build.gradle
index 259ae0e5..10017f54 100644
--- a/app-tv/build.gradle
+++ b/app-tv/build.gradle
@@ -1,10 +1,11 @@
 apply from: "../commons-limited-device.gradle"
+apply from : '../dependencies.gradle'
 
 android {
     defaultConfig {
         applicationId "org.torproject.android.tv"
         minSdkVersion 23 
-        targetSdkVersion 29
+        targetSdkVersion 30
     }
 
     aaptOptions {
@@ -38,16 +39,7 @@ dependencies {
     implementation(
             project(':appcore'),
             project(':intentintegrator'),
-            project(':orbotservice'),
-            libs.android.material,
-            libs.android.snowfall,
-            libs.androidx.coordinator.layout,
-            libs.androidx.localbroadcast,
-            libs.androidx.palette,
-            libs.androidx.recyclerview,
-            libs.apl.appintro,
-            libs.guardian.jtorctl,
-            libs.bundles.leanback
+            project(':orbotservice')
     )
-    androidTestImplementation libs.fastlane.screengrab
+    androidTestImplementation libs.fastlane_screengrab
 }
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
index c57707c8..93304560 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,4 +1,5 @@
 apply from: "../commons-device.gradle"
+apply from : '../dependencies.gradle'
 
 /* gets the version name from the latest Git tag, stripping the leading v off */
 def getVersionName = { ->
@@ -39,7 +40,7 @@ android {
             minSdkVersion 16
             applicationId 'org.torproject.android'
             targetSdkVersion 29
-            versionCode 1651100210
+            versionCode 1652100110
 
             versionName getVersionName()
             archivesBaseName = "Orbot-$versionName"
@@ -57,18 +58,18 @@ android {
                 project(':appcore'),
                 project(':intentintegrator'),
                 project(':orbotservice'),
-                libs.apl.appintro,
-                libs.android.snowfall,
-                libs.android.volley,
-                libs.androidx.core,
-                libs.androidx.localbroadcast,
-                libs.androidx.palette,
-                libs.android.material,
-                libs.bclogic.pulsator,
-                libs.guardian.jtorctl,
-                libs.ipt.proxy
+                libs.apl_appintro,
+                libs.android_snowfall,
+                libs.android_volley,
+                libs.androidx_core,
+                libs.androidx_localbroadcast,
+                libs.androidx_palette,
+                libs.android_material,
+                libs.bclogic_pulsator,
+                libs.guardian_jtorctl,
+                libs.ipt_proxy
 
         )
-        androidTestImplementation libs.fastlane.screengrab
+        androidTestImplementation libs.fastlane_screengrab
     }
 }
\ No newline at end of file
diff --git a/app/src/main/java/org/torproject/android/ui/onboarding/MoatActivity.java b/app/src/main/java/org/torproject/android/ui/onboarding/MoatActivity.java
index f34fdaa6..c3a4f29a 100644
--- a/app/src/main/java/org/torproject/android/ui/onboarding/MoatActivity.java
+++ b/app/src/main/java/org/torproject/android/ui/onboarding/MoatActivity.java
@@ -186,7 +186,7 @@ public class MoatActivity extends AppCompatActivity implements View.OnClickListe
 
         IPtProxy.setStateLocation(fileCacheDir.getAbsolutePath());
 
-        IPtProxy.startObfs4Proxy("DEBUG", false, false);
+        IPtProxy.startObfs4Proxy("DEBUG", false, false, null);
 
         ProxiedHurlStack phs = new ProxiedHurlStack("127.0.0.1", (int) IPtProxy.meekPort(),
           "url=" + OrbotService.getCdnFront("moat-url")
diff --git a/appcore/build.gradle b/appcore/build.gradle
index 39950482..cb7f0c91 100644
--- a/appcore/build.gradle
+++ b/appcore/build.gradle
@@ -4,6 +4,7 @@ plugins {
     id 'kotlin-android-extensions'
 }
 apply from: "../commons.gradle"
+apply from : '../dependencies.gradle'
 
 android {
     defaultConfig {
@@ -26,6 +27,6 @@ dependencies {
     implementation(
             project(':orbotservice'),
             "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version",
-            libs.androidx.appcompat
+            libs.androidx_appcompat
     )
 }
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index 1e39b78d..43678091 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,5 +1,6 @@
 // Top-level build file where you can add configuration options common to all sub-projects/modules.
 buildscript {
+    apply from: './dependencies.gradle'
     ext {
         kotlin_version = '1.5.31'
     }
diff --git a/commons.gradle b/commons.gradle
index f03bd3b2..3aba425b 100644
--- a/commons.gradle
+++ b/commons.gradle
@@ -1,3 +1,4 @@
+
 /*
     Applies across all modules
  */
diff --git a/dependencies.gradle b/dependencies.gradle
new file mode 100644
index 00000000..e8621f40
--- /dev/null
+++ b/dependencies.gradle
@@ -0,0 +1,54 @@
+ext {
+    versions = [
+            android_material             : "1.4.0",
+            android_shell                : "1.0.0",
+            android_snowfall             : "1.2.1",
+            android_volley               : "1.2.0",
+            androidx_appcompat           : "1.3.1",
+            androidx_constraint : "2.1.0",
+            androidx_coordinator: "1.1.0",
+            androidx_core                : "1.6.0",
+            androidx_leanback            : "1.2.0-alpha01",
+            androidx_leanback_paging   : "1.1.0-alpha08",
+            androidx_leanback_tab      : "1.1.0-beta01",
+            androidx_localbroadcast      : "1.0.0",
+            androidx_palette             : "1.0.0",
+            androidx_recyclerview        : "1.2.1",
+            apl_appintro                 : "v4.2.3",
+            bclogic_pulsator             : "1.0.3",
+            fastlane_screengrab          : "1.2.0",
+            guardian_geoip               : "20191217",
+            guardian_jsocks              : "1.0.4",
+            guardian_jtorctl             : "0.4.5.7",
+            ipt_proxy                    : "1.2.0",
+            portmapper                   : "2.0.5",
+            tor_android                  : "0.4.6.7"
+    ]
+
+    libs = [
+            android_material               :  "com.google.android.material:material:$versions.android_material",
+            android_shell                  : "com.jaredrummler:android-shell:$versions.android_shell" ,
+            android_snowfall               :  "com.github.jetradarmobile:android-snowfall:$versions.android_snowfall" ,
+            android_volley                 : "com.android.volley:volley:$versions.android_volley" ,
+            androidx_appcompat             :  "androidx.appcompat:appcompat:$versions.androidx_appcompat" ,
+            androidx_constraint   :  "androidx.constraintlayout:constraintlayout:$versions.androidx_constraint" ,
+            androidx_coordinator  :  "androidx.coordinatorlayout:coordinatorlayout:$versions.androidx_coordinator" ,
+            androidx_core                  :  "androidx.core:core:$versions.androidx_core" ,
+            androidx_leanback_core       : "androidx.leanback:leanback:$versions.androidx_leanback" ,
+            androidx_leanback_paging     :  "androidx.leanback:leanback-paging:$versions.androidx_leanback_paging" ,
+            androidx_leanback_preferences:  "androidx.leanback:leanback-preference:$versions.androidx_leanback" ,
+            androidx_leanback_tab        :  "androidx.leanback:leanback-tab:$versions.androidx_leanback_tab" ,
+            androidx_localbroadcast        :  "androidx.localbroadcastmanager:localbroadcastmanager:$versions.androidx_localbroadcast" ,
+            androidx_palette               :  "androidx.palette:palette:$versions.androidx_palette" ,
+            androidx_recyclerview          :  "androidx.recyclerview:recyclerview$versions.androidx_recyclerview" ,
+            apl_appintro                   :  "com.github.apl-devs:appintro:$versions.apl_appintro" ,
+            bclogic_pulsator               :  "pl.bclogic:pulsator4droid:$versions.bclogic_pulsator" ,
+            fastlane_screengrab            :  "tools.fastlane:screengrab:$versions.fastlane_screengrab" ,
+            guardian_geoip                 :  "info.guardianproject:geoip:$versions.guardian_geoip" ,
+            guardian_jsocks                :  "com.gitlab.guardianproject:jsocksandroid:$versions.guardian_jsocks" ,
+            guardian_jtorctl               :  "info.guardianproject:jtorctl:$versions.guardian_jtorctl" ,
+            ipt_proxy                      :  "com.github.tladesignz:IPtProxy:$versions.ipt_proxy" ,
+            portmapper                     : "com.offbynull.portmapper:portmapper:$versions.portmapper" ,
+            tor_android                    :  "info.guardianproject:tor-android:$versions.tor_android"
+    ]
+}
\ No newline at end of file
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
deleted file mode 100644
index 25ffeb4e..00000000
--- a/gradle/libs.versions.toml
+++ /dev/null
@@ -1,57 +0,0 @@
-[versions]
-android-material-version = "1.4.0"
-android-shell-version = "1.0.0"
-android-snowfall-version = "1.2.1"
-android-volley-version = "1.2.0"
-
-androidx-appcompat-version = "1.3.1"
-androidx-constraint-layout-version = "2.1.0"
-androidx-coordinator-layout-version = "1.1.0"
-androidx-core-version = "1.6.0"
-androidx-leanback-version = "1.2.0-alpha01"
-androidx-leanback-paging-version = "1.1.0-alpha08"
-androidx-leanback-tab-version = "1.1.0-beta01"
-androidx-localbroadcast-version = "1.0.0"
-androidx-palette-version= "1.0.0"
-androidx-recyclerview-version = "1.2.1"
-
-apl-appintro-version = "v4.2.2"
-bclogic-pulsator-version = "1.0.3"
-fastlane-screengrab-version = "1.2.0"
-guardian-geoip-version = "20191217"
-guardian-jsocks-version = "1.0.4"
-guardian-jtorctl-version = "0.4.5.7"
-ipt-proxy-version = "1.0.0"
-portmapper-version = "2.0.5"
-tor-android-version = "0.4.6.7"
-
-[libraries]
-android-material = { module = "com.google.android.material:material", version.ref = "android-material-version" }
-android-shell = { module = "com.jaredrummler:android-shell", version.ref = "android-shell-version" }
-android-snowfall = { module = "com.github.jetradarmobile:android-snowfall", version.ref = "android-snowfall-version" }
-android-volley = { module = "com.android.volley:volley", version.ref = "android-volley-version" }
-
-androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat-version" }
-androidx-constraint-layout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "androidx-constraint-layout-version" }
-androidx-coordinator-layout = { module = "androidx.coordinatorlayout:coordinatorlayout", version.ref = "androidx-coordinator-layout-version" }
-androidx-core = { module = "androidx.core:core", version.ref = "androidx-core-version" }
-androidx-leanback-core = { module = "androidx.leanback:leanback", version.ref = "androidx-leanback-version" }
-androidx-leanback-paging = { module = "androidx.leanback:leanback-paging", version.ref = "androidx-leanback-paging-version" }
-androidx-leanback-preferences = { module = "androidx.leanback:leanback-preference", version.ref = "androidx-leanback-version" }
-androidx-leanback-tab = { module = "androidx.leanback:leanback-tab", version.ref = "androidx-leanback-tab-version" }
-androidx-localbroadcast = { module = "androidx.localbroadcastmanager:localbroadcastmanager", version.ref = "androidx-localbroadcast-version" }
-androidx-palette = { module = "androidx.palette:palette", version.ref = "androidx-palette-version" }
-androidx-recyclerview = { module = "androidx.recyclerview:recyclerview", version.ref = "androidx-recyclerview-version" }
-
-apl-appintro = { module = "com.github.apl-devs:appintro", version.ref = "apl-appintro-version" }
-bclogic-pulsator = { module = "pl.bclogic:pulsator4droid", version.ref = "bclogic-pulsator-version" }
-fastlane-screengrab = { module = "tools.fastlane:screengrab", version.ref = "fastlane-screengrab-version" }
-guardian-geoip = { module = "info.guardianproject:geoip", version.ref = "guardian-geoip-version" }
-guardian-jsocks = { module = "com.gitlab.guardianproject:jsocksandroid", version.ref = "guardian-jsocks-version" }
-guardian-jtorctl = { module = "info.guardianproject:jtorctl", version.ref = "guardian-jtorctl-version" }
-ipt-proxy = { module = "com.github.tladesignz:IPtProxy", version.ref = "ipt-proxy-version" }
-portmapper = { module = "com.offbynull.portmapper:portmapper", version.ref = "portmapper-version" }
-tor-android = { module = "info.guardianproject:tor-android", version.ref = "tor-android-version" }
-
-[bundles]
-leanback= ["androidx-leanback-core", "androidx-leanback-paging", "androidx-leanback-preferences", "androidx-leanback-tab"]
diff --git a/intentintegrator/build.gradle b/intentintegrator/build.gradle
index ad612112..a3b025c5 100644
--- a/intentintegrator/build.gradle
+++ b/intentintegrator/build.gradle
@@ -18,5 +18,5 @@ android {
 
 dependencies {
     implementation fileTree(dir: "libs", include: ["*.jar"])
-    libs.androidx.appcompat
+    libs.androidx_appcompat
 }
\ No newline at end of file
diff --git a/orbotservice/build.gradle b/orbotservice/build.gradle
index 798a2c6e..2ff2e5a7 100644
--- a/orbotservice/build.gradle
+++ b/orbotservice/build.gradle
@@ -1,5 +1,6 @@
 apply plugin: 'com.android.library'
 apply from: "../commons.gradle"
+apply from : '../dependencies.gradle'
 
 android {
     ndkVersion '21.3.6528147'
@@ -38,15 +39,15 @@ android {
 }
 
 dependencies {
-    api libs.guardian.jtorctl
+    api libs.guardian_jtorctl
     implementation(
-            libs.android.shell,
-            libs.androidx.core,
-            libs.androidx.localbroadcast,
-            libs.ipt.proxy,
-            libs.guardian.jsocks,
-            libs.guardian.geoip,
+            libs.android_shell,
+            libs.androidx_core,
+            libs.androidx_localbroadcast,
+            libs.ipt_proxy,
+            libs.guardian_jsocks,
+            libs.guardian_geoip,
             libs.portmapper,
-            libs.tor.android
+            libs.tor_android
     )
 }
diff --git a/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java b/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java
index e02c6f1d..00ae9fb9 100644
--- a/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java
+++ b/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java
@@ -1406,7 +1406,7 @@ public class OrbotService extends VpnService implements TorServiceConstants, Orb
 
                     if (Prefs.bridgesEnabled()) {
                         if (useIPtObfsMeekProxy())
-                            IPtProxy.startObfs4Proxy("DEBUG", false, false);
+                            IPtProxy.startObfs4Proxy("DEBUG", false, false, null);
                         else if (useIPtSnowflakeProxy())
                             startSnowflakeClient();
                     } else if (Prefs.beSnowflakeProxy()) {
diff --git a/settings.gradle b/settings.gradle
index 67697f75..e1bc85bb 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -3,6 +3,7 @@ include ':appcore'
 include ':orbotservice'
 include ':app',':app-mini', ':app-tv'
 
+/**
 enableFeaturePreview("VERSION_CATALOGS")
 dependencyResolutionManagement {
     versionCatalogs {
@@ -10,4 +11,4 @@ dependencyResolutionManagement {
             from(files("./gradle/libs.versions.toml"))
         }
     }
-}
\ No newline at end of file
+}**/
\ No newline at end of file



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits