Skip to content

Commit

Permalink
Cleanup Gradle files and update dependencies
Browse files Browse the repository at this point in the history
Also bump targetSdk and compileSdk to 35.
  • Loading branch information
meenbeese committed Jan 14, 2025
1 parent 0fd1c1f commit a9fe38e
Show file tree
Hide file tree
Showing 13 changed files with 262 additions and 266 deletions.
2 changes: 1 addition & 1 deletion OrbotLib/build.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configurations.maybeCreate("default")
artifacts.add("default",file('OrbotLib.aar'))
artifacts.add("default", file("OrbotLib.aar"))
70 changes: 42 additions & 28 deletions app-tv/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
apply from: '../dependencies.gradle'
apply from: '../commons-device.gradle'
apply from: "../commons.gradle"

android {
namespace = "org.torproject.android.tv"
compileSdk = 35

defaultConfig {
applicationId "org.torproject.android.tv"
minSdkVersion 23
targetSdkVersion 34
minSdk = 23
targetSdk = 35
}

buildTypes {
Expand All @@ -15,44 +17,56 @@ android {
}
}

flavorDimensions "teevee"
splits {
abi {
enable true
reset()
include "x86", "armeabi-v7a", "x86_64", "arm64-v8a"
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

flavorDimensions = ["teevee"]

productFlavors {
teevee {
dimension "teevee"
minSdkVersion 23
applicationId 'org.torproject.android.tv'
compileSdkVersion 34
applicationId "org.torproject.android.tv"
compileSdk 34
versionCode 10020000
versionName 'orbot-tv-1.0.1-tor-0.4.7.14'
versionName "orbot-tv-1.0.1-tor-0.4.7.14"
archivesBaseName = "Orbot-TV-$versionName"
}
}
namespace 'org.torproject.android.tv'
}

configurations {
all {
exclude group: 'androidx.lifecycle', module: 'lifecycle-viewmodel-ktx'
configureEach {
exclude group: "androidx.lifecycle", module: "lifecycle-viewmodel-ktx"
}
}

dependencies {
implementation(
project(':appcore'),
project(':intentintegrator'),
project(':orbotservice'),
libs.android_material,
libs.android_snowfall,
libs.androidx_constraint,
libs.androidx_coordinator,
libs.androidx_leanback_core,
libs.androidx_leanback_paging,
libs.androidx_leanback_preferences,
libs.androidx_leanback_tab,
libs.androidx_palette,
libs.androidx_recyclerview,
libs.apl_appintro
)
androidTestImplementation libs.fastlane_screengrab
implementation(project(":appcore"))
implementation(project(":intentintegrator"))
implementation(project(":orbotservice"))

implementation(libs.android.material)
implementation(libs.android.snowfall)
implementation(libs.androidx.constraint)
implementation(libs.androidx.coordinator)
implementation(libs.androidx.leanback.core)
implementation(libs.androidx.leanback.paging)
implementation(libs.androidx.leanback.preferences)
implementation(libs.androidx.leanback.tab)
implementation(libs.androidx.palette)
implementation(libs.androidx.recyclerview)
implementation(libs.apl.appintro)

androidTestImplementation(libs.fastlane.screengrab)
}
94 changes: 50 additions & 44 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
apply from: "../commons-device.gradle"
apply from: "../commons.gradle"
apply plugin: 'kotlin-android'
apply from : '../dependencies.gradle'

/* gets the version name from the latest Git tag, stripping the leading v off */
// Gets the version name from the latest Git tag, stripping the leading v off
def getVersionName = { ->
def stdout = new ByteArrayOutputStream()
exec {
Expand All @@ -17,44 +16,61 @@ static def versionCodeEpoch() {
}

android {
namespace = "org.torproject.android"
compileSdk = 35

defaultConfig {
applicationId "org.torproject.android"
versionName getVersionName()
minSdkVersion 23
compileSdk 34
targetSdkVersion 34
minSdk = 23
targetSdk = 35
multiDexEnabled true
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
archivesBaseName = "Orbot"
}
compileOptions {
// coreLibraryDesugaringEnabled true

buildFeatures {
buildConfig true
}

buildTypes {
release {
shrinkResources false
minifyEnabled false
}
}

splits {
abi {
enable true
reset()
include "x86", "armeabi-v7a", "x86_64", "arm64-v8a"
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = '17'
jvmTarget = "17"
}

flavorDimensions "free"
flavorDimensions = ["free"]

productFlavors {
fullperm {
dimension "free"
applicationId 'org.torproject.android'
applicationId "org.torproject.android"
versionCode 1741200100
versionName getVersionName()
archivesBaseName = "Orbot-${versionName}"
}

nightly {
dimension "free"
applicationId 'org.torproject.android.nightly'
applicationId "org.torproject.android.nightly"
versionName getVersionName()
versionCode versionCodeEpoch()
archivesBaseName = "Orbot-${versionName}"
Expand All @@ -66,31 +82,13 @@ android {
universalApk true
}
}

packagingOptions {
resources {
excludes += ['META-INF/androidx.localbroadcastmanager_localbroadcastmanager.version']
}
}

dependencies {
implementation(
project(':appcore'),
project(':intentintegrator'),
project(':orbotservice'),
libs.android_material,
libs.android_volley,
libs.androidx_localbroadcast,

//use locally built ipt_proxy+go_tun2socks
project(':OrbotLib')
)

implementation "com.squareup.retrofit2:retrofit:2.9.0"
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'

androidTestImplementation libs.fastlane_screengrab
// coreLibraryDesugaring 'com.android.tools:desugar_j dk_libs:1.1.5'
}
lint {
abortOnError false
checkReleaseBuilds false
Expand All @@ -100,19 +98,27 @@ android {
textReport false
xmlReport false
}
namespace 'org.torproject.android'
}

dependencies {
implementation "androidx.core:core-ktx:1.13.1"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
// Kotlin
implementation "androidx.navigation:navigation-fragment-ktx:2.7.7"
implementation "androidx.navigation:navigation-ui-ktx:2.7.7"

//root detection
implementation 'com.scottyab:rootbeer-lib:0.1.0'
// Use locally built ipt_proxy+go_tun2socks
implementation(project(":OrbotLib"))
implementation(project(":appcore"))
implementation(project(":intentintegrator"))
implementation(project(":orbotservice"))

implementation(libs.android.material)
implementation(libs.android.volley)
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.localbroadcast)
implementation(libs.androidx.navigation.fragment.ktx)
implementation(libs.androidx.navigation.ui.ktx)
implementation(libs.converter.gson)
implementation(libs.retrofit)
implementation(libs.rootbeer.lib)

testImplementation(libs.junit)
androidTestImplementation(libs.androidx.espresso.core)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.fastlane.screengrab)
}
38 changes: 20 additions & 18 deletions appcore/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
id "com.android.library"
id "kotlin-android"
}
apply from: "../commons.gradle"
apply from: '../dependencies.gradle'

android {
namespace = "org.torproject.android.core"
compileSdk = 35

defaultConfig {
minSdkVersion 23
targetSdkVersion 34
minSdk = 23
targetSdk = 35

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
Expand All @@ -17,24 +18,25 @@ android {
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
}
}

kotlinOptions {
jvmTarget = '17'
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

namespace 'org.torproject.android.core'
kotlinOptions {
jvmTarget = "17"
}
}

dependencies {
implementation(
project(':orbotservice'),
"org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version",
libs.androidx_appcompat,
"androidx.preference:preference:1.2.1"
)
implementation 'com.google.android.material:material:1.12.0'
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
implementation(project(":orbotservice"))

implementation(libs.android.material)
implementation(libs.androidx.appcompat)
implementation(libs.androidx.constraint)
implementation(libs.androidx.preference)
}
23 changes: 3 additions & 20 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,22 +1,5 @@
apply from: './dependencies.gradle'

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
agp_version = '8.5.0'
kotlin_version = '2.0.0'
}

repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}

dependencies {
classpath "com.android.tools.build:gradle:$agp_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
plugins {
id "com.android.application" version "8.8.0" apply false
id "org.jetbrains.kotlin.android" version "2.0.0" apply false
}
52 changes: 0 additions & 52 deletions commons-device.gradle

This file was deleted.

Loading

0 comments on commit a9fe38e

Please sign in to comment.