This repository has been archived by the owner on Jun 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add endpoints-framework-all uberjar artifact
* endpoints-framework-all now has all transitive dependencies included in its JAR, repackaged to avoid dependency conflicts * endpoints-framework-guice no longer has endpoints-framework as a dependency, so that one can use the artifact with endpoints-framework or endpoints-framework-all. * endpoints-framework-guice has a small Preconditions class now so that it doesn't have to depend on Guava, which it previously was transitively. * POM URLs have been fixed to be the correct address.
- Loading branch information
Showing
8 changed files
with
75 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
plugins { | ||
id 'com.github.johnrengelman.shadow' version '1.2.3' | ||
} | ||
|
||
configurations { | ||
include | ||
compile.extendsFrom include | ||
} | ||
|
||
jar { | ||
from { | ||
configurations.include.collect { it.isDirectory() ? it : zipTree(it) } | ||
} | ||
} | ||
|
||
def repackagedDir = 'endpoints.repackaged' | ||
|
||
shadowJar { | ||
relocate 'org.apache', "${repackagedDir}.org.apache" | ||
relocate 'org.yaml', "${repackagedDir}.org.yaml" | ||
relocate 'org.joda', "${repackagedDir}.org.joda" | ||
relocate 'com.fasterxml', "${repackagedDir}.com.fasterxml" | ||
relocate 'io.swagger', "${repackagedDir}.io.swagger" | ||
relocate 'com.google.common', "${repackagedDir}.com.google.common" | ||
relocate 'com.google.api.client', "${repackagedDir}.com.google.api.client" | ||
relocate 'org.slf4j', "${repackagedDir}.org.slf4j" | ||
|
||
dependencies { | ||
exclude(dependency('com.google.appengine:appengine-api-1.0-sdk:.*')) | ||
exclude(dependency('javax.servlet:servlet-api:.*')) | ||
} | ||
} | ||
|
||
dependencies { | ||
include project(':endpoints-framework') | ||
compile group: 'com.google.appengine', name: 'appengine-api-1.0-sdk', version: appengineVersion | ||
compile group: 'javax.servlet', name: 'servlet-api', version: servletVersion | ||
} | ||
|
||
configureMaven(project, 'Endpoints Framework', 'A framework for building RESTful web APIs.') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
endpoints-framework-guice/src/main/java/com/google/api/server/spi/guice/Preconditions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright 2017 Google Inc. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.google.api.server.spi.guice; | ||
|
||
/** | ||
* Rather than shading all of Guava into an endpoints-framework-guice-all artifact, we include the | ||
* necessary functionality in this small helper class to remove the dependency. | ||
*/ | ||
final class Preconditions { | ||
static <T> T checkNotNull(T ref, String errorMessage) { | ||
if (ref == null) { | ||
throw new NullPointerException(errorMessage); | ||
} | ||
return ref; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
include ':endpoints-framework', ':endpoints-framework-tools', ':endpoints-framework-guice', ':test-utils', ':discovery-client', ':test-compat', ':test-compat:legacy-app', ':test-compat:new-app', ':test-compat:new-app-guice' | ||
include ':endpoints-framework', 'endpoints-framework-all', ':endpoints-framework-tools', ':endpoints-framework-guice', ':test-utils', ':discovery-client', ':test-compat', ':test-compat:legacy-app', ':test-compat:new-app', ':test-compat:new-app-guice' |