mirror of https://github.com/grpc/grpc-java.git
classifierWithLikes breaks protobuf-gradle-plugin
It causes it to try to download protoc with _fedora in its classifier.
This commit is contained in:
parent
9987aa28a3
commit
551323f93e
41
SECURITY.md
41
SECURITY.md
|
@ -52,12 +52,6 @@ In Maven, you can use the [os-maven-plugin](https://github.com/trustin/os-maven-
|
|||
|
||||
```xml
|
||||
<project>
|
||||
<properties>
|
||||
<!-- Configure the os-maven-plugin extension to expand the classifier on -->
|
||||
<!-- Fedora-"like" systems. -->
|
||||
<os.detection.classifierWithLikes>fedora</os.detection.classifierWithLikes>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
|
@ -76,6 +70,31 @@ In Maven, you can use the [os-maven-plugin](https://github.com/trustin/os-maven-
|
|||
<version>1.4.0.Final</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
<plugins>
|
||||
<!-- Use Ant to configure the appropriate "tcnative.classifier" property -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>initialize</phase>
|
||||
<configuration>
|
||||
<exportAntProperties>true</exportAntProperties>
|
||||
<target>
|
||||
<condition property="tcnative.classifier"
|
||||
value="${os.detected.classifier}-fedora"
|
||||
else="${os.detected.classifier}">
|
||||
<isset property="os.detected.release.fedora"/>
|
||||
</condition>
|
||||
</target>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
```
|
||||
|
@ -97,11 +116,15 @@ buildscript {
|
|||
// Use the osdetector-gradle-plugin
|
||||
apply plugin: "com.google.osdetector"
|
||||
|
||||
// Configure a special classifier on Fedora-"like" systems.
|
||||
osdetector.classifierWithLikes = ['fedora']
|
||||
def tcnative_classifier = osdetector.classifier;
|
||||
// Fedora variants use a different soname for OpenSSL than other linux distributions
|
||||
// (see http://netty.io/wiki/forked-tomcat-native.html).
|
||||
if (osdetector.os == "linux" && osdetector.release.isLike("fedora")) {
|
||||
tcnative_classifier += "_fedora";
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'io.netty:netty-tcnative:1.1.33.Fork7:' + osdetector.classifier
|
||||
compile 'io.netty:netty-tcnative:1.1.33.Fork7:' + tcnative_classifier
|
||||
}
|
||||
```
|
||||
|
||||
|
|
11
build.gradle
11
build.gradle
|
@ -17,8 +17,6 @@ subprojects {
|
|||
apply plugin: "jacoco"
|
||||
|
||||
apply plugin: "com.google.osdetector"
|
||||
// Configure a special classifier on Fedora-"like" systems.
|
||||
osdetector.classifierWithLikes = ['fedora']
|
||||
|
||||
group = "io.grpc"
|
||||
version = "0.10.0-SNAPSHOT"
|
||||
|
@ -112,6 +110,13 @@ subprojects {
|
|||
}
|
||||
}
|
||||
|
||||
def tcnative_suffix = osdetector.classifier;
|
||||
// Fedora variants use a different soname for OpenSSL than other linux distributions
|
||||
// (see http://netty.io/wiki/forked-tomcat-native.html).
|
||||
if (osdetector.os == "linux" && osdetector.release.isLike("fedora")) {
|
||||
tcnative_suffix += "_fedora";
|
||||
}
|
||||
|
||||
def epoll_suffix = "";
|
||||
if (osdetector.classifier in ["linux-x86_64"]) {
|
||||
// The native code is only pre-compiled on certain platforms.
|
||||
|
@ -131,7 +136,7 @@ subprojects {
|
|||
protobuf_plugin: 'com.google.protobuf:protobuf-gradle-plugin:0.7.0',
|
||||
|
||||
netty: 'io.netty:netty-codec-http2:4.1.0.Beta6',
|
||||
netty_tcnative: 'io.netty:netty-tcnative:1.1.33.Fork7:' + osdetector.classifier,
|
||||
netty_tcnative: 'io.netty:netty-tcnative:1.1.33.Fork7:' + tcnative_suffix,
|
||||
netty_transport_native_epoll: 'io.netty:netty-transport-native-epoll:4.1.0.Beta6' + epoll_suffix,
|
||||
|
||||
// Test dependencies.
|
||||
|
|
Loading…
Reference in New Issue