ros app gradle 和其他配置

ros配置

参考项目 https://github.com/rosjava/android_apps

Project复制kinetic包的东西,没有Project的gradle中的plugin:catkin会找不到
CMakeLists.txt

cmake_minimum_required(VERSION 2.8.3)
project(android_apps)

find_package(catkin REQUIRED rosjava_build_tools)

catkin_android_setup(assembleRelease assembleDebug uploadArchives)

catkin_package()


install(DIRECTORY ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_MAVEN_DESTINATION}/com/github/rosjava/android_apps/
DESTINATION ${CATKIN_GLOBAL_MAVEN_DESTINATION}/com/github/rosjava/android_apps)

package.xml

<?xml version="1.0"?>
<package>
  <name>android_apps</name>
  <version>0.2.0</version>
  <description>
    Applications for robot-android pairing..
  </description>
  <url type="website">http://ros.org/wiki/android_apps</url>
  <url type="repository">https://github.com/rosjava/android_apps</url>
  <url type="bugtracker">https://github.com/rosjava/android_apps/issues</url>
  <maintainer email="d.stonier@gmail.com">Daniel Stonier</maintainer>
  <author email="d.stonier@gmail.com">Daniel Stonier</author>
  <author email="kattyokaccho3616@gmail.com">Kazuto Murase</author>
  <license>Apache 2.0</license>

  <buildtool_depend>catkin</buildtool_depend>
  <build_depend>rosjava_build_tools</build_depend>
  <build_depend>rosjava_bootstrap</build_depend>
  <build_depend>android_core</build_depend>
  <build_depend>android_extras</build_depend>
  <build_depend>android_remocons</build_depend>
  <build_depend>rosjava_messages</build_depend>
</package>

配置Project的gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
apply from: "https://github.com/rosjava/android_core/raw/kinetic/buildscript.gradle"
repositories {
    jcenter()
}
dependencies {
    classpath "com.android.tools.build:gradle:2.2.3"

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
}
apply plugin: 'catkin'
allprojects {
repositories {
    jcenter()
}
group 'com.github.rosjava.android_apps'
version = project.catkin.pkg.version

}

subprojects {
apply plugin: 'ros-android'
afterEvaluate { project ->
    android {

        packagingOptions {
            /* https://github.com/rosjava/android_core/issues/194 */
            exclude 'META-INF/LICENSE.txt'
            exclude 'META-INF/NOTICE.txt'
        }
    }
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

配置module:app的gradle

apply plugin: 'com.android.application'

android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
configurations.all {
    resolutionStrategy.force 'com.google.code.findbugs:jsr305:3.0.1'
}
defaultConfig {
    applicationId "com.hlf.rosdemo"
    minSdkVersion 15
    targetSdkVersion 26
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
productFlavors {
    kinetic {
        applicationId "com.github.rosjava.android_apps.make_a_map.kinetic"
    }
}

lintOptions {
    abortOnError = false
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile 'com.github.rosjava.android_remocons:common_tools:[0.2,0.3)'
compile 'org.ros.android_core:android_15:[0.3,0.4)'
compile 'org.ros.rosjava_core:rosjava_geometry:[0.3,0.4)'
compile 'org.ros.rosjava_messages:map_store:[0.3,0.4)'
compile 'org.ros.rosjava_messages:world_canvas_msgs:[0.2,0.3)'

}
  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值