diff --git a/.gitignore b/.gitignore
index 603b140..426a199 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,4 +11,4 @@
/build
/captures
.externalNativeBuild
-.cxx
+.cxx
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 674414f..8106474 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -12,6 +12,7 @@
+
diff --git a/app/build.gradle b/app/build.gradle
index f862e15..a662531 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,5 +1,7 @@
-apply plugin: 'com.android.application'
-apply plugin: 'com.google.protobuf'
+
+plugins{
+ id 'com.android.application'
+}
android {
compileSdkVersion 29
@@ -24,38 +26,19 @@ android {
}
}
-protobuf {
- protoc { artifact = 'com.google.protobuf:protoc:3.10.0' }
- plugins {
- javalite { artifact = "com.google.protobuf:protoc-gen-javalite:3.0.0" }
- grpc {
- artifact = 'io.grpc:protoc-gen-grpc-java:1.25.0'
- }
- }
- generateProtoTasks {
- all().each { task ->
- task.plugins {
- javalite {}
- grpc { // Options added to --grpc_out
- option 'lite'
- }
- }
- }
- }
-}
-
dependencies {
+ implementation project(':protobuf')
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.1.0'
- implementation 'androidx.preference:preference:1.1.0'
+ implementation 'androidx.preference:preference:1.1.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
- implementation 'io.grpc:grpc-okhttp:1.25.0'
- implementation 'io.grpc:grpc-protobuf-lite:1.25.0'
- implementation 'io.grpc:grpc-stub:1.25.0'
+ implementation 'io.grpc:grpc-okhttp:1.28.1' // CURRENT_GRPC_VERSION
+ implementation 'io.grpc:grpc-protobuf-lite:1.28.1' // CURRENT_GRPC_VERSION
+ implementation 'io.grpc:grpc-stub:1.28.1' // CURRENT_GRPC_VERSION
implementation 'javax.annotation:javax.annotation-api:1.2'
implementation 'org.zeromq:jeromq:0.5.2'
}
diff --git a/build.gradle b/build.gradle
index a655e05..18970e5 100644
--- a/build.gradle
+++ b/build.gradle
@@ -6,7 +6,7 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.6.1'
+ classpath 'com.android.tools.build:gradle:3.6.2'
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.10'
// NOTE: Do not place your application dependencies here; they belong
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index f6b961f..5c2d1cf 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 8e7e335..a4b4429 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,5 @@
-#Thu Mar 19 23:08:13 ACDT 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
diff --git a/gradlew b/gradlew
index cccdd3d..83f2acf 100755
--- a/gradlew
+++ b/gradlew
@@ -1,5 +1,21 @@
#!/usr/bin/env sh
+#
+# Copyright 2015 the original author or authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
##############################################################################
##
## Gradle start up script for UN*X
@@ -28,7 +44,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
@@ -109,8 +125,8 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
diff --git a/gradlew.bat b/gradlew.bat
index e95643d..24467a1 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -1,3 +1,19 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
diff --git a/protobuf/.gitignore b/protobuf/.gitignore
new file mode 100644
index 0000000..92e0b0f
--- /dev/null
+++ b/protobuf/.gitignore
@@ -0,0 +1,2 @@
+/build
+build
\ No newline at end of file
diff --git a/protobuf/build.gradle b/protobuf/build.gradle
new file mode 100644
index 0000000..9ad14af
--- /dev/null
+++ b/protobuf/build.gradle
@@ -0,0 +1,48 @@
+plugins {
+ id 'java'
+ id 'com.google.protobuf'
+ id 'idea'
+}
+
+configurations {
+
+ // For grpc python codegen.
+ python {
+ canBeResolved = false
+ canBeConsumed = true
+ }
+}
+
+protobuf {
+ protoc { artifact = 'com.google.protobuf:protoc:3.11.0' }
+ plugins {
+ grpc {
+ artifact = 'io.grpc:protoc-gen-grpc-java:1.28.1' // CURRENT_GRPC_VERSION
+ }
+ grpc_python { path = "$projectDir/grpc_python_plugin" }
+ }
+ generateProtoTasks {
+ all().each { task ->
+ task.builtins {
+ java { option 'lite' }
+
+ python {}
+ }
+ task.plugins {
+ grpc { // Options added to --grpc_out
+ option 'lite'
+ }
+ grpc_python {
+ outputSubDir = 'python'
+ }
+ }
+ }
+ }
+}
+
+dependencies {
+ implementation 'io.grpc:grpc-okhttp:1.28.1' // CURRENT_GRPC_VERSION
+ implementation 'io.grpc:grpc-protobuf-lite:1.28.1' // CURRENT_GRPC_VERSION
+ implementation 'io.grpc:grpc-stub:1.28.1' // CURRENT_GRPC_VERSION
+ implementation 'javax.annotation:javax.annotation-api:1.2'
+}
\ No newline at end of file
diff --git a/protobuf/grpc_python_plugin b/protobuf/grpc_python_plugin
new file mode 100755
index 0000000..e08ae9e
Binary files /dev/null and b/protobuf/grpc_python_plugin differ
diff --git a/app/src/main/proto/SlamController.proto b/protobuf/src/main/proto/SlamController.proto
similarity index 100%
rename from app/src/main/proto/SlamController.proto
rename to protobuf/src/main/proto/SlamController.proto
diff --git a/app/src/main/proto/empty.proto b/protobuf/src/main/proto/empty.proto
similarity index 100%
rename from app/src/main/proto/empty.proto
rename to protobuf/src/main/proto/empty.proto
diff --git a/app/src/main/proto/lidar_tracker.proto b/protobuf/src/main/proto/lidar_tracker.proto
similarity index 100%
rename from app/src/main/proto/lidar_tracker.proto
rename to protobuf/src/main/proto/lidar_tracker.proto
diff --git a/app/src/main/proto/motorService.proto b/protobuf/src/main/proto/motorService.proto
similarity index 100%
rename from app/src/main/proto/motorService.proto
rename to protobuf/src/main/proto/motorService.proto
diff --git a/settings.gradle b/settings.gradle
index 14630a6..189f7fa 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,2 +1,3 @@
include ':app'
+include ':protobuf'
rootProject.name='CarController'