在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):google/osdetector-gradle-plugin开源软件地址(OpenSource Url):https://github.com/google/osdetector-gradle-plugin开源编程语言(OpenSource Language):Java 73.9%开源软件介绍(OpenSource Introduction):OS Detector Plugin for GradleA Gradle plugin that detects the OS name and architecture, providing a uniform classifier to be used in the names of native artifacts. It uses os-maven-plugin under the hood thus produces the same result. Requires Java 8 or up. Latest versionThe latest version UsageTo use this plugin, include in your build script For Gradle 2.1 and higher:plugins {
id "com.google.osdetector" version "1.7.0"
} For Gradle 1.x and 2.0:apply plugin: 'com.google.osdetector'
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.google.gradle:osdetector-gradle-plugin:1.7.0'
}
} The plugin creates
WARNING: DO NOT USE Typical usage exampleTo have separate artifacts for different operating systemsartifacts {
archives(artifactFile) {
classifier osdetector.classifier
type "exe"
extension "exe"
builtBy buildArtifact
}
} To differentiate between debian-like, redhat-like andother linux systems def getLinuxReleaseSuffix() {
if (osdetector.release.isLike('debian')) {
return 'debian'
} else if (osdetector.release.isLike('redhat')) {
return 'redhat'
} else {
return 'other'
}
}
artifacts {
archives(artifactFile) {
classifier osdetector.classifier + '-' + getLinuxReleaseSuffix()
type "exe"
extension "exe"
builtBy buildArtifact
}
} To build and install locally
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论