Skip to content

Commit

Permalink
Move "Urns" utility class to another module. (linkedin#31)
Browse files Browse the repository at this point in the history
This is need to avoid breaking LinkedIn's build.
  • Loading branch information
John Plaisted authored and jywadhwani committed Nov 10, 2020
1 parent f603307 commit 4d3644d
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 1 deletion.
6 changes: 6 additions & 0 deletions core-models-utils/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Module which has utilities for core models, particularly URNs.

This is a separate module from `core-models` due to a technical restriction. Everything in `core-models` is already
defined at LinkedIn, we have essentially forked it in open source. So when we build internally, we need to actually
ignore `core-models`, and use the internal definitions instead. So for anything that _isn't_ forked, i.e. these
utilities, it needs to go into a separate module, or it would break LinkedIn's build, as they would be "missing".
7 changes: 7 additions & 0 deletions core-models-utils/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apply plugin: 'java'

apply from: "$rootDir/gradle/java-publishing.gradle"

dependencies {
compile project(':core-models')
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ private Urns() {
*
* <p>This differs from the {@link Urn#Urn(String, String)} (and {@link
* Urn#createFromTypeSpecificString(String, String)}) in that this does not have a checked {@link
* java.net.URISyntaxException}, and instead will throw an {@link IllegalArgumentException} if the {@code
* URISyntaxException}, and instead will throw an {@link IllegalArgumentException} if the {@code
* typeSpecificString} fails to parse.
*
* <p>The ideal usage for this is when calling this method with compile time constant strings that are known to be
Expand Down
1 change: 1 addition & 0 deletions dao-impl/ebean-dao/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ configurations {
}

dependencies {
compile project(':core-models-utils')
compile project(':dao-api')
compile externalDependency.ebean
compile externalDependency.jsonSimple
Expand Down
1 change: 1 addition & 0 deletions restli-resources/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dependencies {

compileOnly externalDependency.lombok

testCompile project(':core-models-utils')
testCompile project(':testing:core-models-testing')
testCompile project(':testing:test-models')
testCompile externalDependency.parseqTest
Expand Down
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include 'core-models'
include 'core-models-utils'
include 'dao-api'
include 'dao-impl:ebean-dao'
include 'dao-impl:elasticsearch-dao'
Expand Down

0 comments on commit 4d3644d

Please sign in to comment.