Converted to gradle
This commit is contained in:
parent
38706f21aa
commit
01f29ba4a5
|
@ -1,27 +1,126 @@
|
|||
# idea project settings #
|
||||
*.iml
|
||||
*.ipr
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
|
||||
# User-specific stuff:
|
||||
.idea/**/workspace.xml
|
||||
.idea/**/tasks.xml
|
||||
.idea/dictionaries
|
||||
.idea/**/codeStyles/
|
||||
.idea/**/codeStyleSettings.xml
|
||||
|
||||
# Sensitive or high-churn files:
|
||||
.idea/**/dataSources/
|
||||
.idea/**/dataSources.ids
|
||||
.idea/**/dataSources.xml
|
||||
.idea/**/dataSources.local.xml
|
||||
.idea/**/sqlDataSources.xml
|
||||
.idea/**/dynamic.xml
|
||||
.idea/**/uiDesigner.xml
|
||||
.idea/**/shelf/
|
||||
|
||||
|
||||
# Gradle:
|
||||
.idea/**/gradle.xml
|
||||
.idea/**/libraries
|
||||
|
||||
# CMake
|
||||
cmake-build-debug/
|
||||
|
||||
# Mongo Explorer plugin:
|
||||
.idea/**/mongoSettings.xml
|
||||
|
||||
## File-based project format:
|
||||
*.iws
|
||||
.idea/*
|
||||
.idea
|
||||
|
||||
## Plugin-specific files:
|
||||
|
||||
|
||||
# IntelliJ
|
||||
out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Cursive Clojure plugin
|
||||
.idea/replstate.xml
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
fabric.properties
|
||||
|
||||
######################
|
||||
# End JetBrains IDEs #
|
||||
######################
|
||||
|
||||
|
||||
# From https://github.com/github/gitignore/blob/master/Gradle.gitignore
|
||||
.gradle
|
||||
/build/
|
||||
|
||||
# Ignore Gradle GUI config
|
||||
gradle-app.setting
|
||||
|
||||
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
|
||||
!gradle-wrapper.jar
|
||||
|
||||
# Cache of project
|
||||
.gradletasknamecache
|
||||
|
||||
# Work around https://youtrack.jetbrains.com/issue/IDEA-116898
|
||||
gradle/wrapper/gradle-wrapper.properties
|
||||
|
||||
|
||||
|
||||
# From https://github.com/github/gitignore/blob/master/Java.gitignore
|
||||
*.class
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.ear
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
|
||||
# root of compiled classes #
|
||||
target/**/*
|
||||
target/**
|
||||
classes/
|
||||
*.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Icon must end with two \r
|
||||
Icon
|
||||
|
||||
|
||||
# the local maven repository #
|
||||
lib/
|
||||
mvn-local-repo/**/*
|
||||
release.properties
|
||||
/.classpath
|
||||
/.project
|
||||
/.settings/org.eclipse.core.resources.prefs
|
||||
/.settings/org.eclipse.jdt.core.prefs
|
||||
/.settings/org.eclipse.m2e.core.prefs
|
||||
# Thumbnails
|
||||
._*
|
||||
|
||||
# Files that might appear in the root of a volume
|
||||
.DocumentRevisions-V100
|
||||
.fseventsd
|
||||
.Spotlight-V100
|
||||
.TemporaryItems
|
||||
.Trashes
|
||||
.VolumeIcon.icns
|
||||
.com.apple.timemachine.donotpresent
|
||||
|
||||
# Directories potentially created on remote AFP share
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
|
||||
|
||||
##########################################################
|
||||
# Specific to this module
|
||||
|
||||
# iml files are generated by intellij/gradle now
|
||||
**/*.iml
|
||||
|
|
73
LICENSE
73
LICENSE
|
@ -1,44 +1,57 @@
|
|||
- Dorkbox MessageBus - Apache 2.0 License
|
||||
https://github.com/dorkbox
|
||||
Copyright 2015, dorkbox, llc
|
||||
Copyright 2012, Benjamin Diedrichsen
|
||||
Lightweight, extremely fast, and zero-gc message/event bus for Java 6+
|
||||
- MessageBus -
|
||||
https://git.dorkbox.com/dorkbox/MessageBus
|
||||
Copyright 2018 - The Apache Software License, Version 2.0
|
||||
dorkbox, llc
|
||||
Lightweight, extremely fast, and zero-gc message/event bus for Java 6+
|
||||
Copyright 2011 - 2014, XIAM Solutions B.V. (http://www.xiam.nl)
|
||||
|
||||
|
||||
- ASM - BSD 3-clause License
|
||||
http://asm.ow2.org
|
||||
Copyright 2012, France Télécom
|
||||
Bytecode manipulation framework and utilities
|
||||
- ASM -
|
||||
http://asm.ow2.org
|
||||
Copyright 2012 - BSD 3-Clause License
|
||||
France Télécom
|
||||
Bytecode manipulation framework and utilities
|
||||
|
||||
|
||||
- Disruptor - Apache 2.0 License
|
||||
https://github.com/LMAX-Exchange/disruptor/
|
||||
Copyright 2011, LMAX Ltd/
|
||||
A High Performance Inter-Thread Messaging Library
|
||||
- Disruptor -
|
||||
https://github.com/LMAX-Exchange/disruptor/
|
||||
Copyright 2011 - The Apache Software License, Version 2.0
|
||||
LMAX Ltd
|
||||
High Performance Inter-Thread Messaging Library
|
||||
|
||||
|
||||
- FastThreadLocal - BSD 3-clause License
|
||||
https://github.com/LWJGL/lwjgl3/blob/5819c9123222f6ce51f208e022cb907091dd8023/modules/core/src/main/java/org/lwjgl/system/FastThreadLocal.java
|
||||
Copyright 2012-2014, Lightweight Java Game Library Project
|
||||
Riven
|
||||
Optimized and Fast ThreadLocals
|
||||
- Dorkbox Utils -
|
||||
https://git.dorkbox.com/dorkbox/Utilities
|
||||
Copyright 2018 - The Apache Software License, Version 2.0
|
||||
dorkbox, llc
|
||||
|
||||
|
||||
- Kryo - BSD 3-clause License
|
||||
https://github.com/EsotericSoftware/kryo
|
||||
Copyright 2008, Nathan Sweet
|
||||
- FastThreadLocal -
|
||||
https://github.com/LWJGL/lwjgl3/blob/5819c9123222f6ce51f208e022cb907091dd8023/modules/core/src/main/java/org/lwjgl/system/FastThreadLocal.java
|
||||
Copyright 2014 - BSD 3-Clause License
|
||||
Lightweight Java Game Library Project
|
||||
Riven
|
||||
|
||||
|
||||
- MBassador - MIT License
|
||||
https://github.com/bennidi/mbassador
|
||||
Copyright 2012, Benjamin Diedrichsen
|
||||
- Kryo -
|
||||
https://github.com/EsotericSoftware/kryo
|
||||
Copyright 2008 - BSD 3-Clause License
|
||||
Nathan Sweet
|
||||
|
||||
|
||||
- ReflectASM - BSD 3-clause License
|
||||
https://github.com/EsotericSoftware/reflectasm
|
||||
Copyright 2008, Nathan Sweet
|
||||
- MBassador -
|
||||
https://github.com/bennidi/mbassador
|
||||
Copyright 2012 - MIT License
|
||||
Benjamin Diedrichsen
|
||||
|
||||
|
||||
- SLF4J - MIT License
|
||||
http://www.slf4j.org
|
||||
Copyright 2004-2008, QOS.ch
|
||||
- ReflectASM -
|
||||
https://github.com/EsotericSoftware/reflectasm
|
||||
Copyright 2008 - BSD 3-Clause License
|
||||
Nathan Sweet
|
||||
|
||||
|
||||
- SLF4J -
|
||||
http://www.slf4j.org
|
||||
Copyright 2008 - MIT License
|
||||
QOS.ch
|
||||
|
|
12
README.md
12
README.md
|
@ -136,7 +136,7 @@ Release Notes
|
|||
|
||||
This project includes some utility classes that are a small subset of a much larger library. These classes are **kept in sync** with the main utilities library, so "jar hell" is not an issue, and the latest release will always include the same version of utility files as all of the other projects in the dorkbox repository at that time.
|
||||
|
||||
Please note that the utility source code is included in the release and on our [GitHub](https://github.com/dorkbox/Utilities) repository.
|
||||
Please note that the utility source code is included in the release and on our [Git Server](https://git.dorkbox.com/dorkbox/Utilities) repository.
|
||||
|
||||
|
||||
Maven Info
|
||||
|
@ -152,9 +152,17 @@ Maven Info
|
|||
</dependencies>
|
||||
```
|
||||
|
||||
Gradle Info
|
||||
---------
|
||||
````
|
||||
dependencies {
|
||||
...
|
||||
compile 'com.dorkbox:MessageBus:1.20'
|
||||
}
|
||||
````
|
||||
|
||||
Or if you don't want to use Maven, you can access the files directly here:
|
||||
https://oss.sonatype.org/content/repositories/releases/com/dorkbox/MessageBus/
|
||||
https://repo1.maven.org/maven2/releases/com/dorkbox/MessageBus/
|
||||
|
||||
https://repo1.maven.org/maven2/org/slf4j/slf4j-api/
|
||||
https://repo1.maven.org/maven2/com/lmax/disruptor/
|
||||
|
|
|
@ -0,0 +1,331 @@
|
|||
/*
|
||||
* Copyright 2018 dorkbox, llc
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import java.nio.file.Paths
|
||||
import java.time.Instant
|
||||
|
||||
buildscript {
|
||||
// load properties from custom location
|
||||
def propsFile = Paths.get("${projectDir}/../../gradle.properties").toAbsolutePath().normalize().toFile()
|
||||
println("Loading custom property data from: ${propsFile}")
|
||||
|
||||
def props = new Properties()
|
||||
propsFile.withInputStream {props.load(it)}
|
||||
props.each {key, val -> project.ext.set(key, val)}
|
||||
|
||||
// for plugin publishing and license sources
|
||||
repositories {
|
||||
maven {url "https://plugins.gradle.org/m2/"}
|
||||
}
|
||||
dependencies {
|
||||
// this is the only way to also get the source code for IDE auto-complete
|
||||
classpath "gradle.plugin.com.dorkbox:Licensing:1.2.2"
|
||||
classpath "gradle.plugin.com.dorkbox:Licensing:1.2.2:sources"
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'java'
|
||||
id 'maven-publish'
|
||||
id 'signing'
|
||||
|
||||
// close and release on sonatype
|
||||
id 'io.codearte.nexus-staging' version '0.11.0'
|
||||
|
||||
id "com.dorkbox.CrossCompile" version "1.0.1"
|
||||
id "com.dorkbox.VersionUpdate" version "1.2"
|
||||
|
||||
// setup checking for the latest version of a plugin or dependency (and updating the gradle build)
|
||||
id "se.patrikerdes.use-latest-versions" version "0.2.3"
|
||||
id 'com.github.ben-manes.versions' version '0.16.0'
|
||||
}
|
||||
|
||||
// this is the only way to also get the source code for IDE auto-complete
|
||||
apply plugin: "com.dorkbox.Licensing"
|
||||
|
||||
// give us access to api/implementation differences for building java libraries
|
||||
apply plugin: 'java-library'
|
||||
|
||||
|
||||
project.description = 'Lightweight, extremely fast, and zero-gc message/event bus for Java 6+'
|
||||
project.group = 'com.dorkbox'
|
||||
project.version = '1.20'
|
||||
|
||||
project.ext.name = 'MessageBus'
|
||||
project.ext.url = 'https://git.dorkbox.com/dorkbox/MessageBus'
|
||||
|
||||
|
||||
sourceCompatibility = 1.6
|
||||
targetCompatibility = 1.6
|
||||
|
||||
|
||||
licensing {
|
||||
license(License.APACHE_2) {
|
||||
author 'dorkbox, llc'
|
||||
url project.ext.url
|
||||
note project.description
|
||||
note 'Copyright 2011 - 2014, XIAM Solutions B.V. (http://www.xiam.nl)'
|
||||
}
|
||||
|
||||
license('Dorkbox Utils', License.APACHE_2) {
|
||||
author 'dorkbox, llc'
|
||||
url 'https://git.dorkbox.com/dorkbox/Utilities'
|
||||
}
|
||||
|
||||
license('ASM', License.BSD_3) {
|
||||
copyright 2012
|
||||
author 'France Télécom'
|
||||
url 'http://asm.ow2.org'
|
||||
note 'Bytecode manipulation framework and utilities'
|
||||
}
|
||||
|
||||
license('Disruptor', License.APACHE_2) {
|
||||
copyright 2011
|
||||
author 'LMAX Ltd'
|
||||
url 'https://github.com/LMAX-Exchange/disruptor/'
|
||||
note 'High Performance Inter-Thread Messaging Library'
|
||||
}
|
||||
|
||||
license('FastThreadLocal', License.BSD_3) {
|
||||
copyright 2014
|
||||
author 'Lightweight Java Game Library Project'
|
||||
author 'Riven'
|
||||
url 'https://github.com/LWJGL/lwjgl3/blob/5819c9123222f6ce51f208e022cb907091dd8023/modules/core/src/main/java/org/lwjgl/system/FastThreadLocal.java'
|
||||
}
|
||||
|
||||
license('Kryo', License.BSD_3) {
|
||||
copyright 2008
|
||||
author 'Nathan Sweet'
|
||||
url 'https://github.com/EsotericSoftware/kryo'
|
||||
}
|
||||
|
||||
license('ReflectASM', License.BSD_3) {
|
||||
copyright 2008
|
||||
author 'Nathan Sweet'
|
||||
url 'https://github.com/EsotericSoftware/reflectasm'
|
||||
}
|
||||
|
||||
license('MBassador', License.MIT) {
|
||||
copyright 2012
|
||||
author 'Benjamin Diedrichsen'
|
||||
url 'https://github.com/bennidi/mbassador'
|
||||
}
|
||||
|
||||
license('SLF4J', License.MIT) {
|
||||
copyright 2008
|
||||
author 'QOS.ch'
|
||||
url 'http://www.slf4j.org'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
setSrcDirs Collections.singletonList('src')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
repositories {
|
||||
mavenLocal() // this must be first!
|
||||
jcenter()
|
||||
}
|
||||
|
||||
|
||||
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)
|
||||
// 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 'org.ow2.asm:asm:5.2'
|
||||
api 'com.esotericsoftware:reflectasm:1.11.1'
|
||||
api 'com.esotericsoftware:kryo:4.0.2'
|
||||
|
||||
api 'org.slf4j:slf4j-api:1.7.25'
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////
|
||||
////// Task defaults
|
||||
///////////////////////////////
|
||||
tasks.withType(JavaCompile) {
|
||||
options.encoding = 'UTF-8'
|
||||
}
|
||||
|
||||
tasks.withType(Jar) {
|
||||
duplicatesStrategy DuplicatesStrategy.FAIL
|
||||
|
||||
manifest {
|
||||
attributes['Implementation-Version'] = version
|
||||
attributes['Build-Date'] = Instant.now().toString()
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////
|
||||
////// 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
|
||||
/////////////////////////////
|
||||
task sourceJar(type: Jar) {
|
||||
description = "Creates a JAR that contains the source code."
|
||||
|
||||
from sourceSets.main.java
|
||||
|
||||
classifier = "sources"
|
||||
}
|
||||
|
||||
task javaDocJar(type: Jar) {
|
||||
description = "Creates a JAR that contains the javadocs."
|
||||
|
||||
classifier = "javadoc"
|
||||
}
|
||||
|
||||
// for testing, we don't publish to maven central, but only to local maven
|
||||
publishing {
|
||||
publications {
|
||||
maven(MavenPublication) {
|
||||
from components.java
|
||||
|
||||
artifact(javaDocJar)
|
||||
artifact(sourceJar)
|
||||
|
||||
groupId project.group
|
||||
artifactId project.ext.name
|
||||
version project.version
|
||||
|
||||
pom {
|
||||
withXml {
|
||||
// eliminate logback and utilities (no need in maven POMs)
|
||||
def root = asNode()
|
||||
|
||||
root.dependencies.'*'.findAll() {
|
||||
it.artifactId.text() == "Utilities"
|
||||
}.each() {
|
||||
it.parent().remove(it)
|
||||
}
|
||||
}
|
||||
|
||||
name = project.ext.name
|
||||
url = project.ext.url
|
||||
description = project.description
|
||||
|
||||
issueManagement {
|
||||
url = "${project.ext.url}/issues".toString()
|
||||
system = 'Gitea Issues'
|
||||
}
|
||||
|
||||
organization {
|
||||
name = 'dorkbox, llc'
|
||||
url = 'https://dorkbox.com'
|
||||
}
|
||||
|
||||
developers {
|
||||
developer {
|
||||
name = 'dorkbox, llc'
|
||||
email = 'email@dorkbox.com'
|
||||
}
|
||||
}
|
||||
|
||||
scm {
|
||||
url = project.ext.url
|
||||
connection = "scm:${project.ext.url}.git".toString()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url "https://oss.sonatype.org/service/local/staging/deploy/maven2"
|
||||
credentials {
|
||||
username sonatypeUsername
|
||||
password sonatypePassword
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nexusStaging {
|
||||
username sonatypeUsername
|
||||
password sonatypePassword
|
||||
}
|
||||
|
||||
signing {
|
||||
required {hasProperty('sonatypeUsername')}
|
||||
sign publishing.publications.maven
|
||||
}
|
||||
|
||||
// output the release URL in the console
|
||||
releaseRepository.doLast {
|
||||
def URL = 'https://oss.sonatype.org/content/repositories/releases/'
|
||||
def projectName = project.group.toString().replaceAll('\\.', '/')
|
||||
def name = project.ext.name
|
||||
def version = project.version
|
||||
|
||||
println("Maven URL: ${URL}${projectName}/${name}/${version}/")
|
||||
}
|
||||
|
||||
// we don't use maven with the plugin (it's uploaded separately to gradle plugins)
|
||||
tasks.withType(PublishToMavenRepository) {
|
||||
onlyIf {
|
||||
repository == publishing.repositories.maven && publication == publishing.publications.maven
|
||||
}
|
||||
}
|
||||
tasks.withType(PublishToMavenLocal) {
|
||||
onlyIf {
|
||||
publication == publishing.publications.maven
|
||||
}
|
||||
}
|
|
@ -0,0 +1,172 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=$((i+1))
|
||||
done
|
||||
case $i in
|
||||
(0) set -- ;;
|
||||
(1) set -- "$args0" ;;
|
||||
(2) set -- "$args0" "$args1" ;;
|
||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=$(save "$@")
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||
cd "$(dirname "$0")"
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" "$@"
|
|
@ -0,0 +1,84 @@
|
|||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* Copyright 2018 dorkbox, llc
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
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')
|
Loading…
Reference in New Issue