Skip to content

Commit

Permalink
Merge pull request #7 from meshtastic/4.10.0
Browse files Browse the repository at this point in the history
Merge latest plugin architecture. I do not plan to support the older ATAK plugin arch going foward.
  • Loading branch information
niccellular authored Feb 8, 2024
2 parents ede8b77 + 2cf3649 commit 26fbecf
Show file tree
Hide file tree
Showing 11 changed files with 475 additions and 250 deletions.
42 changes: 38 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@

buildscript {

ext.PLUGIN_VERSION = "1.0.4"
ext.ATAK_VERSION = "4.8.1"

ext.PLUGIN_VERSION = "1.0.5"
ext.ATAK_VERSION = "4.10.0"

def takdevVersion = '2.+'

Expand Down Expand Up @@ -59,7 +60,7 @@ buildscript {
}
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.2'
classpath 'com.android.tools.build:gradle:7.4.2'
if(isDevKitEnabled()) {
classpath "com.atakmap.gradle:atak-gradle-takdev:${takdevVersion}"
} else {
Expand All @@ -81,6 +82,7 @@ allprojects {
}

apply plugin: 'com.android.application'
apply plugin: 'com.google.protobuf'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-parcelize'
apply plugin: 'kotlinx-serialization'
Expand Down Expand Up @@ -187,6 +189,11 @@ android {
setProperty("archivesBaseName", "ATAK-Plugin-" + rootProject.name + "-" + PLUGIN_VERSION + "-" + getVersionName() + "-" + ATAK_VERSION)
defaultConfig.versionCode = getVersionCode()
defaultConfig.versionName = PLUGIN_VERSION + " (" + getVersionName() + ") - [" + ATAK_VERSION + "]"


proto {
srcDir 'src/main/protobufs'
}
}

// Move the build types to build-types/<type>
Expand All @@ -213,8 +220,35 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: '*.jar')

implementation 'com.paulmandal.atak:libcotshrink:1.0.3'
implementation 'com.paulmandal.atak:libcotshrink:1.0.4'
implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:1.0-M1-1.4.0-rc"
implementation 'com.google.protobuf:protobuf-kotlin-lite:3.21.12'




}

protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:3.21.9'
}
plugins {
javalite {
// The codegen for lite comes as a separate artifact
artifact = 'com.google.protobuf:protoc-gen-javalite:3.0.0'
}
}
generateProtoTasks {
all().each { task ->
task.builtins {
java {
option 'lite'
}
kotlin {
option 'lite'
}
}
}
}
}
3 changes: 2 additions & 1 deletion app/proguard-gradle.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@

-keep class * extends transapps.maps.plugin.tool.Tool {
}
-keep class * implements transapps.maps.plugin.lifecycle.Lifecycle {
-keep class * implements gov.tak.api.plugin.IPlugin {
}


# overcome an existing bug in the gradle subsystem (3.5.x)
-keep class module-info

Expand Down
5 changes: 2 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@

<!-- allow for plugin discovery -->
<activity android:name="com.atakmap.app.component"
tools:ignore="MissingClass"
android:exported="true">
<intent-filter android:label="@string/app_name">
tools:ignore="MissingClass" android:exported="true">
<intent-filter android:label="@string/app_name" >
<action android:name="com.atakmap.app.component" />
</intent-filter>
</activity>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/assets/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plugin>

<extension
type="transapps.maps.plugin.lifecycle.Lifecycle"
type="gov.tak.api.plugin.IPlugin"
impl="com.atakmap.android.meshtastic.plugin.MeshtasticLifecycle"
singleton="true" />

Expand Down
Loading

0 comments on commit 26fbecf

Please sign in to comment.