Skip to content

Commit

Permalink
Updated the AGP version from 7.4.2 to 8.0.2 and modified gradlew (app…
Browse files Browse the repository at this point in the history
…) of bundleclient to be consistent with that of bundletransport
  • Loading branch information
amarenderreddy committed Jun 13, 2024
1 parent 88a387f commit 70805ef
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 42 deletions.
94 changes: 58 additions & 36 deletions BundleClient/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,85 +1,107 @@
apply plugin: 'com.android.application'
apply plugin: 'com.google.protobuf'
plugins {
id 'com.android.application'
id "com.google.protobuf" version '0.9.0'
}

android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
compileSdkVersion 29

compileSdk 31

defaultConfig {
applicationId "com.ddd.bundleclient"
minSdkVersion 24
targetSdkVersion 29
minSdk 24
targetSdk 31
versionCode 1
versionName "1.0"
}

buildTypes {
debug { minifyEnabled false }
release {
minifyEnabled true
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

lintOptions {
abortOnError false
disable 'GoogleAppIndexingWarning', 'HardcodedText', 'InvalidPackage'
textReport true
textOutput "stdout"
}
}

protobuf {
protoc { artifact = 'com.google.protobuf:protoc:3.17.3' }
plugins {
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.50.2' // CURRENT_GRPC_VERSION need to change for windows, MAC specific
}
}
generateProtoTasks {
all().each { task ->
task.builtins {
java { option 'lite' }
sourceSets {
main {
proto {
// srcDir 'src/main/proto'
}
task.plugins {
grpc { // Options added to --grpc_out
option 'lite' }
java {
// srcDir 'src/main/java'
}
}
}
namespace 'com.ddd.bundleclient'
}

dependencies {
implementation 'io.grpc:grpc-netty-shaded:1.50.2'
implementation 'io.grpc:grpc-protobuf:1.50.2'
implementation 'io.grpc:grpc-stub:1.50.2'
compileOnly 'org.apache.tomcat:annotations-api:6.0.53' // necessary for Java 9+
implementation 'io.grpc:grpc-okhttp:1.50.2' // CURRENT_GRPC_VERSION

def work_version = "2.7.0"
implementation "androidx.work:work-runtime:$work_version"

implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
implementation 'androidx.lifecycle:lifecycle-common-java8:2.3.1'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation ('org.whispersystems:signal-protocol-android:2.2.0')
{
exclude group: 'com.google.protobuf', module:'protobuf-java'
}
// DDD common core
implementation 'com.ddd:bundle-core:0.0.2'

// You need to build grpc-java to obtain these libraries below.
implementation 'io.grpc:grpc-okhttp:1.50.2' // CURRENT_GRPC_VERSION
implementation 'io.grpc:grpc-protobuf:1.50.2' // CURRENT_GRPC_VERSION
implementation 'io.grpc:grpc-stub:1.50.2' // CURRENT_GRPC_VERSION
implementation 'org.apache.tomcat:annotations-api:6.0.53'
implementation 'com.google.code.gson:gson:2.8.7'
implementation group: 'commons-io', name: 'commons-io', version: '2.4'
implementation 'org.apache.commons:commons-text:1.9'

//JSON
implementation 'com.fasterxml.jackson.core:jackson-databind:2.8.9'
// This dependency is used by the application.
implementation 'com.google.guava:guava:30.1.1-jre'
// Signal Protocols
implementation ('org.whispersystems:signal-protocol-android:2.2.0')
{
exclude group: 'com.google.protobuf', module:'protobuf-java'
}
// DDD common core
implementation 'com.ddd:bundle-core:0.0.2'
}

task prepareKotlinBuildScriptModel {

}
protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:3.17.3'
}
plugins {
grpc {
// https://repo.maven.apache.org/maven2/io/grpc/protoc-gen-grpc-java/1.42.0/
// for macOS M1 and M2, using 'osx-x86_64' version
// if M2 also install Rosetta in terminal using command: softwareupdate --install-rosetta
artifact = 'io.grpc:protoc-gen-grpc-java:1.42.0:osx-x86_64'
}
}
generateProtoTasks {
all().each { task ->
task.builtins {
java {
option "lite"
}
}
task.plugins {
grpc { option 'lite' }
}
}
}
}
11 changes: 8 additions & 3 deletions BundleClient/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext {
agp_version = '8.0.2'
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.18"
classpath "com.android.tools.build:gradle:$agp_version"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -21,3 +22,7 @@ allprojects {
mavenLocal()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
3 changes: 2 additions & 1 deletion BundleClient/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Wed Jun 12 14:32:28 PDT 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
5 changes: 4 additions & 1 deletion BundleTransport/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
agp_version = '8.0.2'
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.2.0'
classpath "com.android.tools.build:gradle:$agp_version"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
3 changes: 2 additions & 1 deletion BundleTransport/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Wed Jun 12 14:26:07 PDT 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 70805ef

Please sign in to comment.