在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):Genymobile/genymotion-gradle-plugin开源软件地址(OpenSource Url):https://github.com/Genymobile/genymotion-gradle-plugin开源编程语言(OpenSource Language):Groovy 99.2%开源软件介绍(OpenSource Introduction):Gradle Plugin for GenymotionGradle Plugin DocumentationHere is a short description on how to use the Gradle plugin for Genymotion into your Including the pluginTo use our plugin, you need first to reference our plugin’s repository. Here is what your buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.genymotion:plugin:1.4'
}
} Then, apply the plugin. Insert this line into your build.gradle: apply plugin: "genymotion" Using the pluginWhen this is done you can access to the Genymotion’s Gradle features. You can open a genymotion {
devices {
nexus5 {
template "Google Nexus 5 - 4.4.4 - API 19 - 1080x1920"
}
}
} This simple example will create and launch a Nexus 5 running KitKat right before the connectedAndroidTest task. You can also use the plugin to run your tests in Genymotion Cloud. To add a cloud device, use the following syntax: genymotion {
cloudDevices {
nexus5 {
template "Google Nexus 5 - 4.4.4 - API 19 - 1080x1920"
}
}
} This will create a Nexus 5 device on Genymotion Cloud. But this plugin can do a lot more, read the full documentation for an exhaustive explanation. Downloading the plugin's source codeTo download the plugin, run: git clone --recursive https://github.com/Genymobile/genymotion-gradle-plugin.git Project descriptionThe The Compiling the pluginTo compile the plugin, go to the root project folder and run the following command: ./gradlew :plugin:uploadArchives The build result is a Maven repository. It will be pushed into a new folder: You can now use the plugin as a simple repository. To add it to your project, you must add these lines to your build.gradle file: buildscript {
repositories {
maven { url uri('<path/to/local/repo>') }
}
dependencies {
classpath 'com.genymotion:plugin:+'
}
} Give it a tryExecute the sample "helloworld" using this command: cd samples/helloworld
./gradlew connectedAndroidTest This starts a virtual device on your computer. ContributingThe Gradle Plugin for Genymotion is an open source project under GPL v3 license. Pull requests are strongly encouraged. You can learn more about the plugin architecture in the architecture document. Unit testing the projectBefore pulling, you need to run the unit tests on the project. You can run it with the command: ./gradlew :plugin:test As some tests are using the Android Gradle plugin, you need to have the Android SDK installed and the Optional integration testsThis project also contains integration tests. Before running these tests you need gmtool, the command line tool for Genymotion. It is embedded in the Genymotion app bundle. The integration tests rely on a Method 1:
Method 2: Add the following command line arguments when running the tests: ./gradlew <taskName> -Pusername=<username> -Ppassword=<password> -Plicense=<license> -PgenymotionPath=<path-to-genymotion> Then launch the integration tests with this command: ./gradlew :plugin:integrationTest Or launch all the tests (unit & integration) with this command: ./gradlew :plugin:check |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论