Removed Utilties hard dependency. Fixed issue when custom build props are not available
This commit is contained in:
parent
5a956378b9
commit
9f7506c9da
53
build.gradle
53
build.gradle
|
@ -19,12 +19,14 @@ import java.time.Instant
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
// load properties from custom location
|
// load properties from custom location
|
||||||
def propsFile = Paths.get("${projectDir}/../../gradle.properties").toAbsolutePath().normalize().toFile()
|
def propsFile = Paths.get("${projectDir}/../../gradle.properties").normalize()
|
||||||
println("Loading custom property data from: ${propsFile}")
|
if (propsFile.toFile().canRead()) {
|
||||||
|
println("Loading custom property data from: ${propsFile}")
|
||||||
|
|
||||||
def props = new Properties()
|
def props = new Properties()
|
||||||
propsFile.withInputStream {props.load(it)}
|
propsFile.withInputStream {props.load(it)}
|
||||||
props.each {key, val -> project.ext.set(key, val)}
|
props.each {key, val -> project.ext.set(key, val)}
|
||||||
|
}
|
||||||
|
|
||||||
// for plugin publishing and license sources
|
// for plugin publishing and license sources
|
||||||
repositories {
|
repositories {
|
||||||
|
@ -148,11 +150,6 @@ repositories {
|
||||||
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(project('Utilities')) {
|
|
||||||
// don't include any of the project dependencies for anything
|
|
||||||
transitive = false
|
|
||||||
}
|
|
||||||
|
|
||||||
// our main dependencies are ALSO the same as the limited utilities (they are not automatically pulled in from other sourceSets)
|
// our main dependencies are ALSO the same as the limited utilities (they are not automatically pulled in from other sourceSets)
|
||||||
// needed by the utilities (custom since we don't want to include everything). IntelliJ includes everything, but our builds do not
|
// needed by the utilities (custom since we don't want to include everything). IntelliJ includes everything, but our builds do not
|
||||||
api 'com.lmax:disruptor:3.4.2'
|
api 'com.lmax:disruptor:3.4.2'
|
||||||
|
@ -180,42 +177,6 @@ tasks.withType(Jar) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////
|
|
||||||
////// UTILITIES COMPILE (for inclusion into jars)
|
|
||||||
///////////////////////////////
|
|
||||||
static String[] javaFile(String... fileNames) {
|
|
||||||
def fileList = [] as ArrayList
|
|
||||||
|
|
||||||
for (name in fileNames) {
|
|
||||||
def fixed = name.replace('.', '/') + '.java'
|
|
||||||
fileList.add(fixed)
|
|
||||||
}
|
|
||||||
|
|
||||||
return fileList
|
|
||||||
}
|
|
||||||
|
|
||||||
task compileUtils(type: JavaCompile) {
|
|
||||||
// we don't want the default include of **/*.java
|
|
||||||
getIncludes().clear()
|
|
||||||
|
|
||||||
source = Collections.singletonList('../Utilities/src')
|
|
||||||
include javaFile('dorkbox.util.FastThreadLocal')
|
|
||||||
|
|
||||||
classpath = sourceSets.main.compileClasspath
|
|
||||||
destinationDir = file("$rootDir/build/classes_utilities")
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////
|
|
||||||
////// Jar Tasks
|
|
||||||
///////////////////////////////
|
|
||||||
jar {
|
|
||||||
dependsOn compileUtils
|
|
||||||
|
|
||||||
// include applicable class files from subset of Utilities project
|
|
||||||
from compileUtils.destinationDir
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
//// Maven Publishing + Release
|
//// Maven Publishing + Release
|
||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
|
|
|
@ -13,14 +13,4 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
include("Utilities")
|
|
||||||
|
|
||||||
for (project in rootProject.children) {
|
|
||||||
project.projectDir = file("../$project.name")
|
|
||||||
project.buildFileName = "build.gradle"
|
|
||||||
|
|
||||||
assert (project.projectDir.directory)
|
|
||||||
assert (project.buildFile.file)
|
|
||||||
}
|
|
||||||
|
|
||||||
enableFeaturePreview('STABLE_PUBLISHING')
|
enableFeaturePreview('STABLE_PUBLISHING')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user