diff --git a/jitpack.yml b/jitpack.yml new file mode 100644 index 0000000..24bd797 --- /dev/null +++ b/jitpack.yml @@ -0,0 +1,8 @@ +# configuration file for building snapshots and releases with jitpack.io +jdk: + - openjdk17 +before_install: + - ./scripts/prepareJitpackEnvironment.sh +install: + - FILE="-Dfile=tasklogger-release.aar" + - mvn install:install-file $FILE -DgroupId=com.github.phone-replay -DartifactId=phone-replay-android-lib -Dversion=1.0 -Dpackaging=aar -DgeneratePom=true diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..9b27b56 --- /dev/null +++ b/pom.xml @@ -0,0 +1,10 @@ + + + 4.0.0 + com.github.phone-replay + phone-replay-android-lib + 1.0 + pom + DESCRIPTION + diff --git a/tasklogger-release.aar b/tasklogger-release.aar new file mode 100644 index 0000000..d04267d Binary files /dev/null and b/tasklogger-release.aar differ diff --git a/tasklogger/build.gradle b/tasklogger/build.gradle index e0e0545..c3bba8e 100644 --- a/tasklogger/build.gradle +++ b/tasklogger/build.gradle @@ -1,5 +1,7 @@ plugins { id 'com.android.library' + id 'maven-publish' // << --- ADD This + id 'com.google.protobuf' version '0.9.4' } android { @@ -17,6 +19,7 @@ android { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + consumerProguardFiles 'consumer-rules.pro' // << --- ADD This } } compileOptions { @@ -25,6 +28,59 @@ android { } } +// 4. Add This Java Blocs: +java { + toolchain { + languageVersion = JavaLanguageVersion.of(17) // << --- ADD This + } +} + + +java { + sourceCompatibility = JavaVersion.VERSION_17 // << --- ADD This + targetCompatibility = JavaVersion.VERSION_17 +} + +// 5. Publishing: +publishing { + publications { + maven(MavenPublication) { + groupId = 'com.github.phone-replay' + artifactId = 'phone-replay-android-lib' + version = "1.0" + pom { + description = 'DESCRIPTION' + } + } + } + repositories { // << --- ADD This + mavenLocal() + } +} + + + +protobuf { + protoc { artifact = 'com.google.protobuf:protoc:3.19.2' } + plugins { + grpc { + artifact = 'io.grpc:protoc-gen-grpc-java:1.47.0' + } + } + generateProtoTasks { + all().each { task -> + task.builtins { + java { option 'lite' } + } + task.plugins { + grpc { + option 'lite' + } + } + } + } +} + dependencies { implementation 'androidx.appcompat:appcompat:1.6.1' diff --git a/tasklogger/src/main/AndroidManifest.xml b/tasklogger/src/main/AndroidManifest.xml index a5918e6..8c4c982 100644 --- a/tasklogger/src/main/AndroidManifest.xml +++ b/tasklogger/src/main/AndroidManifest.xml @@ -1,4 +1,5 @@ + \ No newline at end of file diff --git a/tasklogger/src/main/java/com/phonereplay/tasklogger/DeviceInfo.java b/tasklogger/src/main/java/com/phonereplay/tasklogger/DeviceInfo.java index 12fcd06..ba5d285 100644 --- a/tasklogger/src/main/java/com/phonereplay/tasklogger/DeviceInfo.java +++ b/tasklogger/src/main/java/com/phonereplay/tasklogger/DeviceInfo.java @@ -31,7 +31,6 @@ public static String getTotalRAM(Context context) { return formatSize(totalMemory); } - public static String getCurrentNetwork(Context context) { ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo activeNetwork = cm.getActiveNetworkInfo(); diff --git a/tasklogger/src/main/proto/binary.proto b/tasklogger/src/main/proto/binary.proto new file mode 100644 index 0000000..4acc1f8 --- /dev/null +++ b/tasklogger/src/main/proto/binary.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; + +option java_package = "com.phonereplay.tasklogger"; + +// Definição da mensagem TimeLine +message TimeLine { + string coordinates = 1; + string gestureType = 2; + string targetTime = 3; +} + +// Atualização da mensagem BinaryDataRequest para incluir a lista de TimeLine +message BinaryDataRequest { + bytes binaryData = 1; + string sessionId = 2; + repeated TimeLine timeLines = 3; // Lista de TimeLine substituindo LocalGesture +} + +message BinaryDataResponse { + // Adicione quaisquer outros campos de resposta conforme necessário +} + +service BinaryDataService { + rpc sendBinaryData(BinaryDataRequest) returns (BinaryDataResponse); +}