ndktest-gradle-plugin

Run ndk C++ tests on Android devices

Лицензия

Лицензия

The Apache Software License, Version 2.0
Категории

Категории

Gradle Компиляция и сборка
Группа

Группа

com.github.fsbarata
Идентификатор

Идентификатор

ndktest-gradle-plugin
Последняя версия

Последняя версия

1.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

ndktest-gradle-plugin
Run ndk C++ tests on Android devices
Ссылка на сайт

Ссылка на сайт

https://github.com/fsbarata/ndktest-plugin
Система контроля версий

Система контроля версий

https://github.com/fsbarata/ndktest-plugin

Скачать ndktest-gradle-plugin

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.github.fsbarata/ndktest-gradle-plugin/ -->
<dependency>
    <groupId>com.github.fsbarata</groupId>
    <artifactId>ndktest-gradle-plugin</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.fsbarata/ndktest-gradle-plugin/
implementation 'com.github.fsbarata:ndktest-gradle-plugin:1.0.0'
// https://jarcasting.com/artifacts/com.github.fsbarata/ndktest-gradle-plugin/
implementation ("com.github.fsbarata:ndktest-gradle-plugin:1.0.0")
'com.github.fsbarata:ndktest-gradle-plugin:jar:1.0.0'
<dependency org="com.github.fsbarata" name="ndktest-gradle-plugin" rev="1.0.0">
  <artifact name="ndktest-gradle-plugin" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.fsbarata', module='ndktest-gradle-plugin', version='1.0.0')
)
libraryDependencies += "com.github.fsbarata" % "ndktest-gradle-plugin" % "1.0.0"
[com.github.fsbarata/ndktest-gradle-plugin "1.0.0"]

Зависимости

test (2)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
com.android.tools.build : gradle-experimental jar 0.2.0

Модули Проекта

Данный проект не имеет модулей.

NDK Test Gradle Plugin

Description

Build NDK Googletest based C++ tests with gradle and run them on an Android device. Can be used in Android studio.

Requirements

It is important to have a compiling NDK configuration in place.

How to use

Simply apply the plugin and you're ready to go.

buildscript {
    repositories {
        mavenCentral()
    }

    dependencies {
        classpath 'com.github.fsbarata:ndktest-gradle-plugin:1.0.0
    }
}

apply plugin: 'com.github.fsbarata.ndktest'

This will add multiple tasks to your project:

  1. compileVariantNdkTest
  2. connectedVariantNdkTest

Simply running the connectedVariantNdkTest will compile it and run on the device.

Configure

After configuring your NDK, you may configure NDK test plugin by the following:

android {
	...
	sourceSets {
		test {
			jni.srcDirs = ['src/test/jni']
		}
	}
}

ndktest {
	cFlags = "-std=c++11"
	ldLibs = ["log"]
	abiFilters = ['x86','armeabi-v7a']
}

Known issues

  1. Currently not compatible with gradle experimental plugin
  2. Does not run as a testing task
  3. Cannot debug on device using Android studio (some code is in place but I was unable to fix the gdb server)
  4. Does not support multiple devices

Suggestions

  1. Use abi filters to avoid compiling every architecture every time. Use the architecture of the device under test.
  2. Create a gradle task Android studio run configuration
  3. Disable jniDebuggable for faster builds and runs

Версии библиотеки

Версия
1.0.0