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
// Test tag interface | |
interface TestTag { | |
val name: String | |
val pathBuilder: Builder | |
fun updatePathBuilder(builder: Builder? = null): Builder { | |
return builder?.append(name) ?: Builder().append(name) | |
} |
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
publishing { | |
repositories { | |
maven { | |
url "s3://bucket_name" | |
credentials(AwsCredentials) { | |
accessKey "" | |
secretKey "" | |
} | |
} |
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
/** | |
* Get an array of directory paths that should be used as resource directories | |
* @return Array of directory paths | |
*/ | |
ext.getResourceDirectories = { String rootDirectory -> | |
def resourceDirectories = [] | |
def resourceDirectoryName = "res" | |
new File(rootDirectory).eachDirRecurse { directory -> | |
if (directory.getName() == resourceDirectoryName) { |
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
def projectQueue = [rootProject] as Queue | |
while (!projectQueue.isEmpty()) { | |
def queueProject = projectQueue.poll() | |
println queueProject.projectDir | |
queueProject.childProjects.each { name, childProject -> | |
projectQueue.add(childProject) | |
} | |
} |
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
/** | |
* Import a Kodein module if it exists. We're not catching any exceptions in this method so it will | |
* fail fast. If a Kodein module doesn't import, the app will probably crash soon after this method | |
* executes anyway. If the app crashes here, it will be easier to debug. | |
*/ | |
fun Kodein.Builder.importIfExists(qualifiedClassName: String, fieldName: String) { | |
val moduleClass = Class.forName(qualifiedClassName) | |
val moduleField = moduleClass.declaredFields.find { field -> | |
field.name == fieldName | |
} |