diff --git a/BundleClient/app/build.gradle b/BundleClient/app/build.gradle index 4903962974..b99b35a61f 100644 --- a/BundleClient/app/build.gradle +++ b/BundleClient/app/build.gradle @@ -1,5 +1,7 @@ -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 { @@ -15,41 +17,44 @@ android { 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-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' @@ -57,29 +62,44 @@ dependencies { 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 { -} \ No newline at end of file +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' + } + } + generateProtoTasks { + all().each { task -> + task.builtins { + java { + option "lite" + } + } + task.plugins { + grpc { option 'lite' } + } + } + } +} diff --git a/BundleClient/build.gradle b/BundleClient/build.gradle index 572638e4f0..ea5a09ae5e 100644 --- a/BundleClient/build.gradle +++ b/BundleClient/build.gradle @@ -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 @@ -21,3 +22,7 @@ allprojects { mavenLocal() } } + +task clean(type: Delete) { + delete rootProject.buildDir +} \ No newline at end of file diff --git a/BundleClient/gradle/wrapper/gradle-wrapper.properties b/BundleClient/gradle/wrapper/gradle-wrapper.properties index 8049c684f0..f1a02ac205 100644 --- a/BundleClient/gradle/wrapper/gradle-wrapper.properties +++ b/BundleClient/gradle/wrapper/gradle-wrapper.properties @@ -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 diff --git a/BundleTransport/build.gradle b/BundleTransport/build.gradle index b41e620977..8f39827d0e 100644 --- a/BundleTransport/build.gradle +++ b/BundleTransport/build.gradle @@ -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 diff --git a/BundleTransport/gradle/wrapper/gradle-wrapper.properties b/BundleTransport/gradle/wrapper/gradle-wrapper.properties index 15de90249f..cee0295451 100644 --- a/BundleTransport/gradle/wrapper/gradle-wrapper.properties +++ b/BundleTransport/gradle/wrapper/gradle-wrapper.properties @@ -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