-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
60d8f40
commit a4be47c
Showing
7 changed files
with
99 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ local.properties | |
gradle.properties | ||
|
||
.cxx | ||
venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
.gradle | ||
build | ||
prebuiltLibs | ||
|
||
libmavsdk_server.so | ||
libc++_shared.so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
buildscript { | ||
repositories { | ||
google() | ||
jcenter() | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
classpath 'com.android.tools.build:gradle:3.6.0' | ||
classpath 'com.android.tools.build:gradle:7.0.4' | ||
} | ||
} | ||
|
||
allprojects { | ||
apply plugin: 'com.android.library' | ||
apply plugin: 'maven' | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'signing' | ||
|
||
repositories { | ||
google() | ||
jcenter() | ||
mavenCentral() | ||
} | ||
|
||
def mavsdk_server_release = "v0.48.0" | ||
|
@@ -28,11 +28,11 @@ allprojects { | |
def archiveName = "mavsdk_server_android-" + arch + "_" + mavsdk_server_release + ".tar" | ||
def archiveFile = new File(project.buildDir.getAbsolutePath() + "/tmp/" + archiveName) | ||
def archiveUrl = "https://github.com/mavlink/MAVSDK/releases/download/" + mavsdk_server_release + "/mavsdk_server_android-" + arch + ".tar" | ||
def destDir = project.projectDir.getAbsolutePath() + "/src/main/jniLibs" | ||
def destDir = project.projectDir.getAbsolutePath() + "/src/main/prebuiltLibs" | ||
|
||
if (!archiveFile.exists()) { | ||
project.logger.lifecycle("Downloading " + archiveFile.getName() + " into " + archiveFile.getAbsolutePath() + "...") | ||
new URL(archiveUrl).withInputStream{ i -> archiveFile.withOutputStream{ it << i }} | ||
new URL(archiveUrl).withInputStream { i -> archiveFile.withOutputStream { it << i } } | ||
} else { | ||
project.logger.lifecycle("Archive already exists! Skipping download!") | ||
} | ||
|
@@ -41,7 +41,7 @@ allprojects { | |
copy { | ||
from tarTree(archiveFile) | ||
eachFile({ file -> if (file.getName().endsWith(".so")) file.setMode(0755) }) | ||
into (destDir) | ||
into(destDir) | ||
} | ||
} | ||
|
||
|
@@ -62,61 +62,61 @@ allprojects { | |
} | ||
|
||
if (project.hasProperty('ossrhUsername') | ||
&& project.hasProperty('ossrhPassword')) { | ||
&& project.hasProperty('ossrhPassword')) { | ||
|
||
signing { | ||
useGpgCmd() | ||
sign configurations.archives | ||
} | ||
|
||
uploadArchives { | ||
repositories { | ||
mavenDeployer { | ||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } | ||
|
||
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { | ||
authentication(userName: ossrhUsername, password: ossrhPassword) | ||
} | ||
|
||
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { | ||
authentication(userName: ossrhUsername, password: ossrhPassword) | ||
} | ||
signing { | ||
useGpgCmd() | ||
sign configurations.archives | ||
} | ||
|
||
pom.project { | ||
name 'MAVSDK-Server' | ||
packaging 'aar' | ||
description 'MAVSDK server for Android.' | ||
url 'https://github.com/mavlink/MAVSDK-Java' | ||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
pom { | ||
name = 'MAVSDK-Server' | ||
packaging = 'aar' | ||
description = 'MAVSDK server for Android.' | ||
url = 'https://github.com/mavlink/MAVSDK-Java' | ||
|
||
scm { | ||
connection = 'scm:git:https://github.com/mavlink/MAVSDK-Java' | ||
developerConnection = 'scm:git:https://github.com/mavlink/MAVSDK-Java' | ||
url = 'https://github.com/mavlink/MAVSDK-Java' | ||
} | ||
|
||
scm { | ||
connection 'scm:git:https://github.com/mavlink/MAVSDK-Java' | ||
developerConnection 'scm:git:https://github.com/mavlink/MAVSDK-Java' | ||
url 'https://github.com/mavlink/MAVSDK-Java' | ||
} | ||
licenses { | ||
license { | ||
name = 'BSD 3-Clause "New"' | ||
url = 'https://opensource.org/licenses/BSD-3-Clause' | ||
} | ||
} | ||
|
||
licenses { | ||
license { | ||
name 'BSD 3-Clause "New"' | ||
url 'https://opensource.org/licenses/BSD-3-Clause' | ||
developers { | ||
developer { | ||
id = 'jonasvautherin' | ||
name = 'Jonas Vautherin' | ||
email = '[email protected]' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
repositories { | ||
maven { | ||
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/" | ||
|
||
developers { | ||
developer { | ||
id 'jonasvautherin' | ||
name 'Jonas Vautherin' | ||
email '[email protected]' | ||
} | ||
credentials { | ||
username = ossrhUsername | ||
password = ossrhPassword | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
android { | ||
compileSdkVersion 29 | ||
compileSdkVersion 31 | ||
|
||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
|
@@ -125,7 +125,7 @@ android { | |
|
||
defaultConfig { | ||
minSdkVersion 21 | ||
targetSdkVersion 29 | ||
targetSdkVersion 31 | ||
|
||
archivesBaseName = 'mavsdk-server' | ||
group = 'io.mavsdk' | ||
|
@@ -149,5 +149,5 @@ android { | |
} | ||
} | ||
|
||
ndkVersion "22.1.7171670" | ||
ndkVersion "23.1.7779620" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#Sat Jan 29 14:03:55 CET 2022 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
cmake_minimum_required(VERSION 3.4.1) | ||
cmake_minimum_required(VERSION 3.10.2) | ||
|
||
add_library(mavsdk_server SHARED IMPORTED) | ||
set_target_properties(mavsdk_server | ||
PROPERTIES IMPORTED_LOCATION | ||
"${CMAKE_CURRENT_SOURCE_DIR}/../jniLibs/${ANDROID_ABI}/libmavsdk_server.so") | ||
"${CMAKE_CURRENT_SOURCE_DIR}/../prebuiltLibs/${ANDROID_ABI}/libmavsdk_server.so") | ||
|
||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../jniLibs/include") | ||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../prebuiltLibs/include") | ||
|
||
add_library(native_lib SHARED native-lib.cpp) | ||
target_link_libraries(native_lib mavsdk_server log) |
41 changes: 0 additions & 41 deletions
41
mavsdk_server/src/main/jniLibs/include/mavsdk_server_api.h
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
buildscript { | ||
repositories { | ||
jcenter() | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
|
@@ -12,7 +13,7 @@ subprojects { | |
apply plugin: 'com.google.protobuf' | ||
apply plugin: 'idea' | ||
apply plugin: 'java-library' | ||
apply plugin: 'maven' | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'signing' | ||
|
||
group = 'io.mavsdk' | ||
|
@@ -21,6 +22,7 @@ subprojects { | |
|
||
repositories { | ||
jcenter() | ||
mavenCentral() | ||
} | ||
|
||
configurations { | ||
|
@@ -100,55 +102,55 @@ subprojects { | |
if (project.hasProperty('ossrhUsername') | ||
&& project.hasProperty('ossrhPassword')) { | ||
|
||
signing { | ||
useGpgCmd() | ||
sign configurations.archives | ||
} | ||
|
||
uploadArchives { | ||
repositories { | ||
mavenDeployer { | ||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } | ||
|
||
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { | ||
authentication(userName: ossrhUsername, password: ossrhPassword) | ||
} | ||
|
||
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { | ||
authentication(userName: ossrhUsername, password: ossrhPassword) | ||
} | ||
signing { | ||
useGpgCmd() | ||
sign configurations.archives | ||
} | ||
|
||
pom.project { | ||
name 'MAVSDK-Java' | ||
packaging 'jar' | ||
description 'MAVSDK client for Java.' | ||
url 'https://github.com/mavlink/MAVSDK-Java' | ||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
pom { | ||
name = 'MAVSDK-Java' | ||
packaging = 'jar' | ||
description = 'MAVSDK client for Java.' | ||
url = 'https://github.com/mavlink/MAVSDK-Java' | ||
|
||
scm { | ||
connection = 'scm:git:https://github.com/mavlink/MAVSDK-Java' | ||
developerConnection = 'scm:git:https://github.com/mavlink/MAVSDK-Java' | ||
url = 'https://github.com/mavlink/MAVSDK-Java' | ||
} | ||
|
||
scm { | ||
connection 'scm:git:https://github.com/mavlink/MAVSDK-Java' | ||
developerConnection 'scm:git:https://github.com/mavlink/MAVSDK-Java' | ||
url 'https://github.com/mavlink/MAVSDK-Java' | ||
} | ||
licenses { | ||
license { | ||
name = 'BSD 3-Clause "New"' | ||
url = 'https://opensource.org/licenses/BSD-3-Clause' | ||
} | ||
} | ||
|
||
licenses { | ||
license { | ||
name 'BSD 3-Clause "New"' | ||
url 'https://opensource.org/licenses/BSD-3-Clause' | ||
developers { | ||
developer { | ||
id = 'jonasvautherin' | ||
name = 'Jonas Vautherin' | ||
email = '[email protected]' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
repositories { | ||
maven { | ||
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/" | ||
|
||
developers { | ||
developer { | ||
id 'jonasvautherin' | ||
name 'Jonas Vautherin' | ||
email '[email protected]' | ||
} | ||
credentials { | ||
username = ossrhUsername | ||
password = ossrhPassword | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
task checkstyle(type: Checkstyle) { | ||
configFile = rootProject.file("config/checkstyle/checkstyle.xml") | ||
|
@@ -189,7 +191,7 @@ subprojects { | |
implementation "io.grpc:grpc-okhttp:${grpcVersion}" | ||
implementation "io.grpc:grpc-protobuf-lite:${grpcVersion}" | ||
implementation "io.grpc:grpc-stub:${grpcVersion}" | ||
implementation 'org.slf4j:slf4j-api:1.7.25' | ||
implementation 'org.slf4j:slf4j-api:1.7.35' | ||
api 'io.reactivex.rxjava2:rxjava:2.2.21' | ||
|
||
compileOnly "javax.annotation:javax.annotation-api:1.3.2" | ||
|