From 6ecf55f52b8c12d007bf6f44b1113b42237b10b5 Mon Sep 17 00:00:00 2001 From: ds58 <30220598+ds58@users.noreply.github.com> Date: Mon, 23 Sep 2024 14:32:22 -0500 Subject: [PATCH] Various cleanup, dependency bumps, remove old snapshot stuff (#83) --- README.md | 16 ---- build.gradle.kts | 10 +-- .../us/ihmc/build/IHMCBuildExtension.kt | 51 ++++++----- .../kotlin/us/ihmc/build/IHMCBuildLogTools.kt | 2 +- .../us/ihmc/build/IHMCBuildProperties.kt | 32 ++++--- .../kotlin/us/ihmc/build/IHMCBuildTools.kt | 86 +++++++------------ .../ihmc/build/IHMCCompositeBuildAssembler.kt | 2 +- .../ihmc/build/IHMCDependenciesExtension.kt | 57 ++++++------ .../us/ihmc/build/IHMCDependencyGraphviz.kt | 12 +-- .../IHMCKotlinDependencyHandlerDelegate.kt | 2 +- .../us/ihmc/build/IHMCSettingsConfigurator.kt | 9 -- .../us/ihmc/build/SemanticVersionNumber.kt | 53 ------------ .../ihmc/build/ContinuousIntegrationTest.kt | 64 -------------- .../us/ihmc/build/GradleTestingTools.kt | 10 +-- .../kotlin/us/ihmc/build/PublishApiTest.kt | 46 +--------- tests/dependsOnSnapshot/build.gradle.kts | 28 ------ tests/dependsOnSnapshot/gradle.properties | 14 --- tests/dependsOnSnapshot/settings.gradle.kts | 20 ----- .../java/us.ihmc/BasicTestApplication.java | 11 --- .../us/ihmc/BasicTestApplicationTest.java | 14 --- .../YourProjectAFastTestSuite.java | 24 ------ tests/generateTestSuitesTest/build.gradle.kts | 28 ------ .../generateTestSuitesTest/gradle.properties | 14 --- .../settings.gradle.kts | 20 ----- .../java/us.ihmc/BasicTestApplication.java | 11 --- .../us/ihmc/BasicTestApplicationTest.java | 14 --- .../YourProjectAFastTestSuite.java | 24 ------ 27 files changed, 125 insertions(+), 549 deletions(-) delete mode 100644 src/main/kotlin/us/ihmc/build/SemanticVersionNumber.kt delete mode 100644 src/test/kotlin/us/ihmc/build/ContinuousIntegrationTest.kt delete mode 100644 tests/dependsOnSnapshot/build.gradle.kts delete mode 100644 tests/dependsOnSnapshot/gradle.properties delete mode 100644 tests/dependsOnSnapshot/settings.gradle.kts delete mode 100644 tests/dependsOnSnapshot/src/main/java/us.ihmc/BasicTestApplication.java delete mode 100644 tests/dependsOnSnapshot/src/test/java/us/ihmc/BasicTestApplicationTest.java delete mode 100644 tests/dependsOnSnapshot/src/test/java/us/ihmc/generatedTestSuites/YourProjectAFastTestSuite.java delete mode 100644 tests/generateTestSuitesTest/build.gradle.kts delete mode 100644 tests/generateTestSuitesTest/gradle.properties delete mode 100644 tests/generateTestSuitesTest/settings.gradle.kts delete mode 100644 tests/generateTestSuitesTest/src/main/java/us.ihmc/BasicTestApplication.java delete mode 100644 tests/generateTestSuitesTest/src/test/java/us/ihmc/BasicTestApplicationTest.java delete mode 100644 tests/generateTestSuitesTest/src/test/java/us/ihmc/generatedTestSuites/YourProjectAFastTestSuite.java diff --git a/README.md b/README.md index dff4cb9e..5e13233d 100644 --- a/README.md +++ b/README.md @@ -301,22 +301,6 @@ another common reason that projects don't make it into the build. ### Learn more -##### Snapshots - -Snapshots is an unsupported feature which is used internally in our CI. - -`publish -PsnapshotMode=true -PpublishUrl=ihmcSnapshots` - -Setting `snapshotMode=true` changes the version to `SNAPSHOT-$branchName-$integrationNumber` and enables parsing of versions -declared as `SNAPSHOT-*`, matching -them to artifacts found to be available on IHMC's Artifactory snapshots repos. - -Gradle Plugin Site: https://plugins.gradle.org/plugin/us.ihmc.ihmc-build - -Documentation on Confluence: https://confluence.ihmc.us/display/BUILD/New+Build+Configuration+Documentation - -Presentation outlining the purpose of this project: https://docs.google.com/presentation/d/1xH8kKYqLaBkRXms_04nb_yyoV6MRchLO8EAtz9WqfZA/edit?usp=sharing - #### Testing Without Publishing to the Gradle Plugins Site Use `gradle publishToMavenLocal` diff --git a/build.gradle.kts b/build.gradle.kts index 065b4584..6b806420 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,11 +2,11 @@ plugins { `kotlin-dsl` `java-gradle-plugin` `maven-publish` - id("com.gradle.plugin-publish") version "1.2.1" + id("com.gradle.plugin-publish") version "1.3.0" } group = "us.ihmc" -version = "0.29.7" +version = "0.29.800" repositories { maven { url = uri("https://plugins.gradle.org/m2/") } // needed for included plugins @@ -16,12 +16,12 @@ dependencies { api("ca.cutterslade.gradle:gradle-dependency-analyze:1.8.3") { exclude("junit", "junit") } - api("com.dorongold.plugins:task-tree:2.1.0") + api("com.dorongold.plugins:task-tree:4.0.0") api("guru.nidi:graphviz-kotlin:0.18.1") api("com.hierynomus:sshj:0.38.0") - testApi("org.junit.jupiter:junit-jupiter-api:5.8.2") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.2") + testApi("org.junit.jupiter:junit-jupiter-api:5.10.3") + testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.3") } tasks.withType { diff --git a/src/main/kotlin/us/ihmc/build/IHMCBuildExtension.kt b/src/main/kotlin/us/ihmc/build/IHMCBuildExtension.kt index 37db8c01..ebf3b9ad 100644 --- a/src/main/kotlin/us/ihmc/build/IHMCBuildExtension.kt +++ b/src/main/kotlin/us/ihmc/build/IHMCBuildExtension.kt @@ -2,7 +2,7 @@ package us.ihmc.build import groovy.util.Eval import groovy.util.Node -import org.apache.commons.lang3.SystemUtils +import org.apache.commons.exec.OS import org.gradle.api.GradleException import org.gradle.api.JavaVersion import org.gradle.api.Project @@ -94,22 +94,22 @@ open class IHMCBuildExtension(val project: Project) if (property.key as String == "group") { group = property.value as String - LogTools.info("Loaded group: " + group) + LogTools.info("Loaded group: $group") } if (property.key as String == "version") { version = property.value as String - LogTools.info("Loaded version: " + version) + LogTools.info("Loaded version: $version") } if (property.key as String == "vcsUrl") { vcsUrl = property.value as String - LogTools.info("Loaded vcsUrl: " + vcsUrl) + LogTools.info("Loaded vcsUrl: $vcsUrl") } if (property.key as String == "openSource") { openSource = Eval.me(property.value as String) as Boolean - LogTools.info("Loaded openSource: " + openSource) + LogTools.info("Loaded openSource: $openSource") } } } @@ -296,7 +296,7 @@ open class IHMCBuildExtension(val project: Project) if (compatibilityVersionProperty != "CURRENT") { java.sourceCompatibility = JavaVersion.valueOf(compatibilityVersionProperty) - java.targetCompatibility = JavaVersion.valueOf(compatibilityVersionProperty); + java.targetCompatibility = JavaVersion.valueOf(compatibilityVersionProperty) } for (sourceSet in java.sourceSets) { @@ -312,7 +312,7 @@ open class IHMCBuildExtension(val project: Project) if (compatibilityVersionProperty != "CURRENT") { javaSubproject.sourceCompatibility = JavaVersion.valueOf(compatibilityVersionProperty) - javaSubproject.targetCompatibility = JavaVersion.valueOf(compatibilityVersionProperty); + javaSubproject.targetCompatibility = JavaVersion.valueOf(compatibilityVersionProperty) } for (sourceSet in javaSubproject.sourceSets) { @@ -337,7 +337,7 @@ open class IHMCBuildExtension(val project: Project) { var modifiedDirectory = directory if (sourceSetName == "main") - modifiedDirectory = "src/main/" + directory + modifiedDirectory = "src/main/$directory" sourceSet(sourceSetName).java.srcDir(modifiedDirectory) } @@ -346,7 +346,7 @@ open class IHMCBuildExtension(val project: Project) { var modifiedDirectory = directory if (sourceSetName == "main") - modifiedDirectory = "src/main/" + directory + modifiedDirectory = "src/main/$directory" sourceSet(sourceSetName).resources.srcDir(modifiedDirectory) } @@ -358,10 +358,10 @@ open class IHMCBuildExtension(val project: Project) fun sourceSetProject(sourceSetName: String): Project { - if (sourceSetName == "main") - return project + return if (sourceSetName == "main") + project else - return project.project(project.name + "-" + sourceSetName) + project.project(project.name + "-" + sourceSetName) } fun javaFXModule(moduleName: String, version: String): String @@ -371,7 +371,7 @@ open class IHMCBuildExtension(val project: Project) fun javaFXOSIdentifier(): String { - var archSuffix = ""; + var archSuffix = "" val isARM64 = System.getProperty("os.arch").equals("aarch64") || System.getProperty("os.arch").equals("arm64") || System.getProperty("ihmc.build.javafxarm64", "false").equals("true") @@ -380,9 +380,14 @@ open class IHMCBuildExtension(val project: Project) return when { - SystemUtils.IS_OS_WINDOWS -> "win" // No additional platforms for win - SystemUtils.IS_OS_MAC -> "mac$archSuffix" - else -> "linux$archSuffix" + + OS.isFamilyWindows() -> "win" // No additional platforms for win + OS.isFamilyMac() -> "mac$archSuffix" + OS.isFamilyUnix() -> "linux$archSuffix" + else -> + { + throw RuntimeException("Unsupported javafx platform") + } } } @@ -433,7 +438,7 @@ open class IHMCBuildExtension(val project: Project) } else if (artifactId.startsWith(includedBuild.name)) { - for (extraSourceSet in IHMCBuildProperties(project.logger, includedBuild.projectDir.toPath()).extraSourceSets) + for (extraSourceSet in IHMCBuildProperties(includedBuild.projectDir.toPath()).extraSourceSets) { if (artifactId == (includedBuild.name + "-$extraSourceSet")) { @@ -453,7 +458,7 @@ open class IHMCBuildExtension(val project: Project) internal fun getExternalDependencyVersion(groupId: String, artifactId: String, declaredVersion: String): String { - var externalDependencyVersion: String + val externalDependencyVersion: String // For high-level projects depending on develop, // use version: "source" to make sure you've got everything, and fail fast @@ -468,10 +473,10 @@ open class IHMCBuildExtension(val project: Project) } else { - var message = "$groupId:$artifactId's version is set to \"$declaredVersion\" and is not included in the build. Please put" + + val message = "$groupId:$artifactId's version is set to \"$declaredVersion\" and is not included in the build. Please put" + " $artifactId in your composite build or use a release." LogTools.error(message) - throw GradleException("[ihmc-build] " + message) + throw GradleException("[ihmc-build] $message") } } else // Pass directly to gradle as declared @@ -559,7 +564,9 @@ open class IHMCBuildExtension(val project: Project) private fun Project.declarePublication(artifactName: String, sourceSet: SourceSet) { val publishing = extensions.getByType(PublishingExtension::class.java) - val publication = publishing.publications.create(sourceSet.name.capitalize(), MavenPublication::class.java) + val publication = publishing.publications.create(sourceSet.name.replaceFirstChar { + if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString() + }, MavenPublication::class.java) publication.groupId = group as String publication.artifactId = artifactName publication.version = version as String @@ -606,6 +613,7 @@ open class IHMCBuildExtension(val project: Project) implementationDependencies: HashSet, configurationName: String) { + // TODO: cleanup configurations.getByName(configurationName).resolvedConfiguration.run { // Get each of the resolved artifacts for the configuration // firstLevelModuleDependencies may not return all dependencies if they aren't resolved locally @@ -656,6 +664,7 @@ open class IHMCBuildExtension(val project: Project) private fun Project.findExclusions(exclusions: HashMap>, configurationName: String) { + // TODO: cleanup configurations.getByName(configurationName).dependencies.forEach { dependency -> if (dependency is DefaultExternalModuleDependency) { diff --git a/src/main/kotlin/us/ihmc/build/IHMCBuildLogTools.kt b/src/main/kotlin/us/ihmc/build/IHMCBuildLogTools.kt index 3a11acf3..3288f79e 100644 --- a/src/main/kotlin/us/ihmc/build/IHMCBuildLogTools.kt +++ b/src/main/kotlin/us/ihmc/build/IHMCBuildLogTools.kt @@ -43,6 +43,6 @@ class IHMCBuildLogTools(val logger: Logger) private fun ihmcBuildMessage(message: Any): String { - return "[ihmc-build] " + message + return "[ihmc-build] $message" } } \ No newline at end of file diff --git a/src/main/kotlin/us/ihmc/build/IHMCBuildProperties.kt b/src/main/kotlin/us/ihmc/build/IHMCBuildProperties.kt index 017b8f01..cfce7033 100644 --- a/src/main/kotlin/us/ihmc/build/IHMCBuildProperties.kt +++ b/src/main/kotlin/us/ihmc/build/IHMCBuildProperties.kt @@ -1,12 +1,11 @@ package us.ihmc.build import groovy.util.Eval -import org.gradle.api.logging.Logger import java.io.FileInputStream import java.nio.file.Path import java.util.* -class IHMCBuildProperties(val logger: Logger, val projectPath: Path) : Comparable +class IHMCBuildProperties(val projectPath: Path) : Comparable { var folderName = projectPath.fileName.toString() var kebabCasedName: String = "" @@ -23,15 +22,15 @@ class IHMCBuildProperties(val logger: Logger, val projectPath: Path) : Comparabl { if (propertyKey == "excludeFromCompositeBuild") { - excludeFromCompositeBuild = (properties.get(propertyKey)!! as String).toBoolean() + excludeFromCompositeBuild = (properties[propertyKey]!! as String).toBoolean() if (excludeFromCompositeBuild) { - LogTools.info("Excluding " + folderName + ". Property excludeFromCompositeBuild = " + properties.get(propertyKey)) + LogTools.info("Excluding " + folderName + ". Property excludeFromCompositeBuild = " + properties[propertyKey]) } } if (propertyKey == "isProjectGroup") { - isProjectGroup = IHMCBuildTools.isProjectGroupCompatibility(properties.get(propertyKey)!! as String) + isProjectGroup = IHMCBuildTools.isProjectGroupCompatibility(properties[propertyKey]!! as String) if (isProjectGroup) { LogTools.info("Found group: $folderName (isProjectGroup = $isProjectGroup) $projectPath") @@ -39,7 +38,8 @@ class IHMCBuildProperties(val logger: Logger, val projectPath: Path) : Comparabl } if (propertyKey == "extraSourceSets") { - extraSourceSets.addAll(Eval.me(properties.get(propertyKey)!! as String) as ArrayList) + // TODO: cleanup + extraSourceSets.addAll(Eval.me(properties[propertyKey]!! as String) as ArrayList) } } @@ -47,7 +47,7 @@ class IHMCBuildProperties(val logger: Logger, val projectPath: Path) : Comparabl for (i in 0 until extraSourceSets.size) { - extraSourceSets.set(i, IHMCBuildTools.toKebabCased(extraSourceSets[i])) + extraSourceSets[i] = IHMCBuildTools.toKebabCased(extraSourceSets[i]) } allArtifacts.add(kebabCasedName) @@ -57,22 +57,20 @@ class IHMCBuildProperties(val logger: Logger, val projectPath: Path) : Comparabl } } - fun kebabCasedNameCompatibilityDuplicate(projectName: String, properties: Properties): String + private fun kebabCasedNameCompatibilityDuplicate(projectName: String, properties: Properties): String { - if (properties.containsKey("kebabCasedName") && !(properties.get("kebabCasedName") as String).startsWith("$")) + return if (properties.containsKey("kebabCasedName") && !(properties["kebabCasedName"] as String).startsWith("$")) { - return properties.get("kebabCasedName") as String - } - else if (properties.containsKey("title") && !(properties.get("title") as String).startsWith("$")) + properties["kebabCasedName"] as String + } else if (properties.containsKey("title") && !(properties["title"] as String).startsWith("$")) { - return IHMCBuildTools.titleToKebabCase(properties.get("title") as String) - } - else + IHMCBuildTools.titleToKebabCase(properties["title"] as String) + } else { val defaultValue = IHMCBuildTools.toKebabCased(projectName) LogTools.info("No value found for kebabCasedName. Using default value: $defaultValue") - properties.set("kebabCasedName", defaultValue) - return defaultValue + properties["kebabCasedName"] = defaultValue + defaultValue } } diff --git a/src/main/kotlin/us/ihmc/build/IHMCBuildTools.kt b/src/main/kotlin/us/ihmc/build/IHMCBuildTools.kt index 0ae2fdbb..0d7afd52 100644 --- a/src/main/kotlin/us/ihmc/build/IHMCBuildTools.kt +++ b/src/main/kotlin/us/ihmc/build/IHMCBuildTools.kt @@ -1,12 +1,11 @@ package us.ihmc.build -import org.apache.commons.lang3.StringUtils -import org.apache.commons.lang3.mutable.MutableInt import org.gradle.api.* import org.gradle.api.plugins.ExtraPropertiesExtension import java.nio.file.Files import java.nio.file.Path import java.util.* +import java.util.concurrent.atomic.AtomicInteger lateinit var LogTools: IHMCBuildLogTools @@ -14,7 +13,7 @@ object IHMCBuildTools { fun isProjectGroupCompatibility(rawString: String): Boolean { - return rawString.trim().lowercase().contains("true"); + return rawString.trim().lowercase().contains("true") } fun kebabCasedNameCompatibility(projectName: String, extra: ExtraPropertiesExtension): String @@ -56,34 +55,10 @@ object IHMCBuildTools fun publishUrlCompatibility(extra: ExtraPropertiesExtension): String { - if (extra.has("publishMode")) // Backwards compatibility - { - LogTools.warn("publishMode has been replaced by publishUrl. See README for details.") - } if (containsValidStringProperty("publishUrl", extra)) { return (extra.get("publishUrl") as String).trim() } - else if (containsValidStringProperty("publishMode", extra)) // Backwards compatibility - { - val publishModeString = (extra.get("publishMode") as String).trim().lowercase() - - if (publishModeString.contains("local")) - { - LogTools.warn("Using publishMode = ${(extra.get("publishMode") as String)} to set publishUrl = local.") - return "local" - } - else if (publishModeString.contains("snapshot")) - { - LogTools.warn("Using publishMode = ${(extra.get("publishMode") as String)} to set publishUrl = ihmcSnapshots.") - return "ihmcSnapshots" - } - else - { - LogTools.warn("Using publishMode = ${(extra.get("publishMode") as String)} to set publishUrl = ihmcRelease.") - return "ihmcRelease" - } - } else { return "local" // default @@ -183,48 +158,47 @@ object IHMCBuildTools fun toKebabCased(anyCased: String): String { - var kebabCased = toPreKababWithBookendHandles(anyCased); + var kebabCased = toPreKababWithBookendHandles(anyCased) - kebabCased = kebabCased.substring(1, kebabCased.length - 1); + kebabCased = kebabCased.substring(1, kebabCased.length - 1) - return kebabCased; + return kebabCased } - fun toPreKababWithBookendHandles(anyCased: String): String + private fun toPreKababWithBookendHandles(anyCased: String): String { - val parts = ArrayList(); - var part = ""; + val parts = ArrayList() + var part = "" - for (i in 0 until anyCased.length) + for (element in anyCased) { - var character = anyCased[i].toString(); - if (StringUtils.isAllUpperCase(character) || StringUtils.isNumeric(character)) + if (element.isUpperCase() || element.isDigit()) { if (!part.isEmpty()) { - parts.add(part.lowercase()); + parts.add(part.lowercase()) } - part = character; + part = element.toString() } else { - part += character; + part += element } } if (!part.isEmpty()) { - parts.add(part.lowercase()); + parts.add(part.lowercase()) } - var kebab = ""; + var kebab = "" for (i in 0 until parts.size) { - kebab += '-'; - kebab += parts.get(i); + kebab += '-' + kebab += parts[i] } - kebab += '-'; + kebab += '-' - return kebab; + return kebab } fun parseDependenciesFromGradleKtsFile(buildFile: Path): SortedSet @@ -235,13 +209,13 @@ object IHMCBuildTools val fileAsString = String(Files.readAllBytes(buildFile)) val pattern = Regex("ependencies[ \\t\\x0B\\S]*\\{").toPattern() - val matcher = pattern.matcher(fileAsString); + val matcher = pattern.matcher(fileAsString) while (matcher.find()) { val end = matcher.end() - val indexAfterEndBracket = matchingBracket(fileAsString.substring(end), MutableInt(0)) + val indexAfterEndBracket = matchingBracket(fileAsString.substring(end), AtomicInteger(0)) val dependencyBlockString = " " + fileAsString.substring(end, end + indexAfterEndBracket - 1).trim() @@ -257,7 +231,7 @@ object IHMCBuildTools val artifactNames = TreeSet() val pattern = Regex("(compile|implementation|api|runtime)[ \\t\\x0B]*\\([ \\t\\x0B]*\\\"[\\s\\-\\w\\.]+:[\\$\\s\\:\\-\\w\\.]+\\\"").toPattern() - val matcher = pattern.matcher(dependencyBlockString); + val matcher = pattern.matcher(dependencyBlockString) while (matcher.find()) { val match = matcher.toMatchResult().group() @@ -270,21 +244,21 @@ object IHMCBuildTools return artifactNames } - fun matchingBracket(string: String, i: MutableInt): Int + fun matchingBracket(string: String, i: AtomicInteger): Int { - while (i.value < string.length) + while (i.get() < string.length) { - if (string[i.value] == '{') + if (string[i.get()] == '{') { - i.increment() - i.setValue(matchingBracket(string, i)) + i.getAndIncrement() + i.set(matchingBracket(string, i)) } - if (string[i.value] == '}') + if (string[i.get()] == '}') { - return i.value + 1 + return i.get() + 1 } - i.increment() + i.getAndIncrement() } throw GradleException("No end bracket for dependencies block") diff --git a/src/main/kotlin/us/ihmc/build/IHMCCompositeBuildAssembler.kt b/src/main/kotlin/us/ihmc/build/IHMCCompositeBuildAssembler.kt index 63e2f9e1..3cd901be 100644 --- a/src/main/kotlin/us/ihmc/build/IHMCCompositeBuildAssembler.kt +++ b/src/main/kotlin/us/ihmc/build/IHMCCompositeBuildAssembler.kt @@ -150,7 +150,7 @@ class IHMCCompositeBuildAssembler(val configurator: IHMCSettingsConfigurator) if (isPathCompatibleWithBuildConfiguration(directory)) { // Load the properties, even for the root - includedBuildProperties = IHMCBuildProperties(logger, directory) + includedBuildProperties = IHMCBuildProperties(directory) // Always include the build root, but observe external exclude preferences if (forceInclude(includedBuildProperties.kebabCasedName) || !includedBuildProperties.excludeFromCompositeBuild) diff --git a/src/main/kotlin/us/ihmc/build/IHMCDependenciesExtension.kt b/src/main/kotlin/us/ihmc/build/IHMCDependenciesExtension.kt index 7e39aa70..688603b2 100644 --- a/src/main/kotlin/us/ihmc/build/IHMCDependenciesExtension.kt +++ b/src/main/kotlin/us/ihmc/build/IHMCDependenciesExtension.kt @@ -105,7 +105,7 @@ open class IHMCDependenciesExtension(private val mainProject: Project, if (configurationName != "api") { - LogTools.debug(" Unusual dependency on configuration: " + configurationName + ": " + dependencyNotation) + LogTools.debug(" Unusual dependency on configuration: $configurationName: $dependencyNotation") } return modifiedDependencyNotation @@ -116,27 +116,26 @@ open class IHMCDependenciesExtension(private val mainProject: Project, if (dependencyNotation is String) { val split = dependencyNotation.split(":") - + val modifiedVersion = ihmcBuildExtension.getExternalDependencyVersion(split[0], split[1], split[2]) - + var modifiedString = "" for (i in split.indices) { - if (i == 2) + modifiedString += if (i == 2) { - modifiedString += modifiedVersion - } - else + modifiedVersion + } else { - modifiedString += split[i] + split[i] } - + if (i < split.size - 1) { modifiedString += ":" } } - + return modifiedString } else if (dependencyNotation is Map<*, *>) @@ -144,42 +143,42 @@ open class IHMCDependenciesExtension(private val mainProject: Project, val groupId: String val artifactName: String val dependencyMode: String - - if (dependencyNotation.contains("group") && dependencyNotation.get("group") is String) + + if (dependencyNotation.contains("group") && dependencyNotation["group"] is String) { - groupId = dependencyNotation.get("group") as String + groupId = dependencyNotation["group"] as String } else { return dependencyNotation } - if (dependencyNotation.contains("name") && dependencyNotation.get("name") is String) + if (dependencyNotation.contains("name") && dependencyNotation["name"] is String) { - artifactName = dependencyNotation.get("name") as String + artifactName = dependencyNotation["name"] as String } else { return dependencyNotation } - if (dependencyNotation.contains("version") && dependencyNotation.get("version") is String) + if (dependencyNotation.contains("version") && dependencyNotation["version"] is String) { - dependencyMode = dependencyNotation.get("version") as String + dependencyMode = dependencyNotation["version"] as String } else { return dependencyNotation } - + val modifiedVersion = ihmcBuildExtension.getExternalDependencyVersion(groupId, artifactName, dependencyMode) - - var modifiedMap = hashMapOf() - + + val modifiedMap = hashMapOf() + for (entry in dependencyNotation) { - modifiedMap.put(entry.key as String, entry.value) + modifiedMap[entry.key as String] = entry.value } - modifiedMap.put("version", modifiedVersion) - + modifiedMap["version"] = modifiedVersion + return modifiedMap } else @@ -199,12 +198,12 @@ open class IHMCDependenciesExtension(private val mainProject: Project, { override fun hasMethod(name: String, vararg arguments: Any): Boolean { - return arguments.size != 0 && projectToConfigure.configurations.findByName(name) != null + return arguments.isNotEmpty() && projectToConfigure.configurations.findByName(name) != null } override fun tryInvokeMethod(name: String, vararg arguments: Any): DynamicInvokeResult { - if (arguments.size == 0) + if (arguments.isEmpty()) { return DynamicInvokeResult.notFound() } @@ -212,17 +211,17 @@ open class IHMCDependenciesExtension(private val mainProject: Project, val normalizedArgs = listOf(*arguments) if (normalizedArgs.size == 2 && normalizedArgs[1] is Closure<*>) { - return DynamicInvokeResult.found(filterAndAddDependency(configuration.name, normalizedArgs[0] as Any, normalizedArgs[1] as Closure)) + return DynamicInvokeResult.found(filterAndAddDependency(configuration.name, normalizedArgs[0], normalizedArgs[1] as Closure)) } else if (normalizedArgs.size == 1) { - return DynamicInvokeResult.found(filterAndAddDependency(configuration.name, normalizedArgs[0] as Any)) + return DynamicInvokeResult.found(filterAndAddDependency(configuration.name, normalizedArgs[0])) } else { for (arg in normalizedArgs) { - dependencies.add(configuration.name, arg as Any) // we don't know how to filter, let Gradle handle + dependencies.add(configuration.name, arg) // we don't know how to filter, let Gradle handle } return DynamicInvokeResult.found() } diff --git a/src/main/kotlin/us/ihmc/build/IHMCDependencyGraphviz.kt b/src/main/kotlin/us/ihmc/build/IHMCDependencyGraphviz.kt index 30b62756..e47f8984 100644 --- a/src/main/kotlin/us/ihmc/build/IHMCDependencyGraphviz.kt +++ b/src/main/kotlin/us/ihmc/build/IHMCDependencyGraphviz.kt @@ -41,7 +41,7 @@ class IHMCDependencyGraphviz(val project: Project) if (projectName == id) { - continue; + continue } if (!nodeMap.containsKey(id)) @@ -61,10 +61,10 @@ class IHMCDependencyGraphviz(val project: Project) nodeMap.values.forEach { graph.add(it) } - val dateFormat = SimpleDateFormat("yyyyMMdd_HHmmssSSS"); - val calendar = Calendar.getInstance(); - val timestamp = dateFormat.format(calendar.getTime()); - val filePathName = System.getProperty("user.home") + "/.ihmc/logs/" + timestamp + "_" + "_DependencyGraph.png"; + val dateFormat = SimpleDateFormat("yyyyMMdd_HHmmssSSS") + val calendar = Calendar.getInstance() + val timestamp = dateFormat.format(calendar.getTime()) + val filePathName = System.getProperty("user.home") + "/.ihmc/logs/" + timestamp + "_" + "_DependencyGraph.png" var graphvizBytes = 200000000 val graphvizMegabytesProperty = project.findProperty("graphvizTotalMemoryMB") @@ -89,7 +89,7 @@ class IHMCDependencyGraphviz(val project: Project) if (childId == id) { - continue; + continue } if (!nodeMap.containsKey(childId)) diff --git a/src/main/kotlin/us/ihmc/build/IHMCKotlinDependencyHandlerDelegate.kt b/src/main/kotlin/us/ihmc/build/IHMCKotlinDependencyHandlerDelegate.kt index 3ba16a9f..a2e6e758 100644 --- a/src/main/kotlin/us/ihmc/build/IHMCKotlinDependencyHandlerDelegate.kt +++ b/src/main/kotlin/us/ihmc/build/IHMCKotlinDependencyHandlerDelegate.kt @@ -1,4 +1,4 @@ -package us.ihmc.build; +package us.ihmc.build import groovy.lang.Closure diff --git a/src/main/kotlin/us/ihmc/build/IHMCSettingsConfigurator.kt b/src/main/kotlin/us/ihmc/build/IHMCSettingsConfigurator.kt index 2427bee5..bbc1a775 100644 --- a/src/main/kotlin/us/ihmc/build/IHMCSettingsConfigurator.kt +++ b/src/main/kotlin/us/ihmc/build/IHMCSettingsConfigurator.kt @@ -2,7 +2,6 @@ package us.ihmc.build import groovy.lang.MissingPropertyException import groovy.util.Eval -import org.gradle.api.GradleException import org.gradle.api.initialization.Settings import org.gradle.api.logging.Logger import org.gradle.api.plugins.ExtraPropertiesExtension @@ -19,14 +18,6 @@ class IHMCSettingsConfigurator(val settings: Settings, val logger: Logger, val e LogTools.info("Evaluating " + settings.rootProject.projectDir.toPath().fileName.toString() + " settings.gradle") ext["org.gradle.workers.max"] = 200 - - if (SemanticVersionNumber(settings.gradle.gradleVersion).compareTo(SemanticVersionNumber("5.3.1")) < 0) - { - val message = "Gradle version ${settings.gradle.gradleVersion} detected. Versions earlier than 5.3.1 are not supported. " + - "Please upgrade to the latest version." - LogTools.error(message) - throw GradleException(message) - } } fun configureExtraSourceSets() diff --git a/src/main/kotlin/us/ihmc/build/SemanticVersionNumber.kt b/src/main/kotlin/us/ihmc/build/SemanticVersionNumber.kt deleted file mode 100644 index ceb8246d..00000000 --- a/src/main/kotlin/us/ihmc/build/SemanticVersionNumber.kt +++ /dev/null @@ -1,53 +0,0 @@ -package us.ihmc.build - -class SemanticVersionNumber(private val rawVersion: String) : Comparable -{ - private val version = rawVersion.trim().split("-").get(0) - - init { - if (version.isBlank() || !version.matches("[0-9]+(\\.[0-9]+)*".toRegex())) - throw IllegalArgumentException("Invalid version format: $version") - } - - fun get(): String - { - return this.version - } - - override operator fun compareTo(other: SemanticVersionNumber): Int - { - val thisParts = this.get().split("\\.".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray() - val thatParts = other.get().split("\\.".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray() - val length = Math.max(thisParts.size, thatParts.size) - for (i in 0 until length) - { - val thisPart = if (i < thisParts.size) - Integer.parseInt(thisParts[i]) - else - 0 - val thatPart = if (i < thatParts.size) - Integer.parseInt(thatParts[i]) - else - 0 - if (thisPart < thatPart) - return -1 - if (thisPart > thatPart) - return 1 - } - return 0 - } - - override fun equals(other: Any?): Boolean - { - if (this === other) - return true - if (other == null) - return false - return if (this.javaClass != other.javaClass) false else this.compareTo(other as SemanticVersionNumber) == 0 - } - - override fun hashCode(): Int - { - return super.hashCode() - } -} \ No newline at end of file diff --git a/src/test/kotlin/us/ihmc/build/ContinuousIntegrationTest.kt b/src/test/kotlin/us/ihmc/build/ContinuousIntegrationTest.kt deleted file mode 100644 index 3cd547e5..00000000 --- a/src/test/kotlin/us/ihmc/build/ContinuousIntegrationTest.kt +++ /dev/null @@ -1,64 +0,0 @@ -package us.ihmc.build - -import org.junit.jupiter.api.Assertions.* -import org.junit.jupiter.api.Disabled -import org.junit.jupiter.api.Test - -/** - * Must be run from ihmc-build directory! - */ -class ContinuousIntegrationTest -{ - @Disabled - @Test - fun testGenerateTestSuitesSucceeds() - { - var output = runGradleTask("test", "generateTestSuitesTest") - - assertTrue(output.contains(Regex("BUILD SUCCESSFUL"))) - - output = runGradleTask("generateTestSuites", "generateTestSuitesTest") - - assertTrue(output.contains(Regex("YourProjectAFast"))) - assertTrue(output.contains(Regex("BUILD SUCCESSFUL"))) - } - - @Disabled - @Test - fun testPublishSnapshotLocal() - { - var output: String - - output = runGradleTask("publish -PsnapshotMode=true -PpublishUrl=local", "generateTestSuitesTest") - - assertTrue(output.contains(Regex("BUILD SUCCESSFUL"))) - - val nexusUsername = "" - val nexusPassword = "" - - output = runGradleTask("publish -PsnapshotMode=true -PpublishUrl=ihmcSnapshots " + - "-PnexusUsername=$nexusUsername -PnexusPassword=$nexusPassword", "generateTestSuitesTest") - - assertTrue(output.contains(Regex("BUILD SUCCESSFUL"))) - } - - @Disabled - @Test - fun testResolveSnapshotLocal() - { -// var output: String -// -// output = runGradleTask("publish -PsnapshotMode=true -PpublishUrl=local", "generateTestSuitesTest") -// -// assertTrue(output.contains(Regex("BUILD SUCCESSFUL"))) -// -// val credentials = EncryptedPropertyManager.loadEncryptedCredentials() -// val nexusUsername = credentials.get("nexusUsername") -// val nexusPassword = credentials.get("nexusPassword") -// -// output = runGradleTask("publish -PsnapshotMode=true -PpublishUrl=ihmcSnapshots " + -// "-PnexusUsername=$nexusUsername -PnexusPassword=$nexusPassword", "generateTestSuitesTest") - -// assertTrue(output.contains(Regex("BUILD SUCCESSFUL"))) - } -} \ No newline at end of file diff --git a/src/test/kotlin/us/ihmc/build/GradleTestingTools.kt b/src/test/kotlin/us/ihmc/build/GradleTestingTools.kt index 41150d6a..8ea88b2b 100644 --- a/src/test/kotlin/us/ihmc/build/GradleTestingTools.kt +++ b/src/test/kotlin/us/ihmc/build/GradleTestingTools.kt @@ -1,6 +1,6 @@ package us.ihmc.build -import org.apache.commons.lang3.SystemUtils +import org.apache.commons.exec.OS import java.io.BufferedReader import java.io.IOException import java.io.InputStreamReader @@ -12,7 +12,7 @@ val gradleExe = getLocalGradlePath() private fun getLocalGradlePath(): String { - val process = Runtime.getRuntime().exec(if (SystemUtils.IS_OS_WINDOWS) "where gradle" else "which gradle") + val process = Runtime.getRuntime().exec(if (OS.isFamilyWindows()) "where gradle" else "which gradle") val reader = BufferedReader(InputStreamReader(process.inputStream)) val path = reader.readLine() println("Gradle path: $path") @@ -21,10 +21,10 @@ private fun getLocalGradlePath(): String fun runGradleTask(command: String?, project: String): String { - if (command == null || command.isEmpty()) - return runCommand("$gradleExe", Paths.get("tests/$project").toAbsolutePath()) + return if (command.isNullOrEmpty()) + runCommand(gradleExe, Paths.get("tests/$project").toAbsolutePath()) else - return runCommand("$gradleExe $command", Paths.get("tests/$project").toAbsolutePath()) + runCommand("$gradleExe $command", Paths.get("tests/$project").toAbsolutePath()) } fun runCommand(command: String, workingDir: Path): String diff --git a/src/test/kotlin/us/ihmc/build/PublishApiTest.kt b/src/test/kotlin/us/ihmc/build/PublishApiTest.kt index d1a12932..a9bf3266 100644 --- a/src/test/kotlin/us/ihmc/build/PublishApiTest.kt +++ b/src/test/kotlin/us/ihmc/build/PublishApiTest.kt @@ -5,38 +5,10 @@ import org.junit.jupiter.api.Test class PublishApiTest { - @Test - fun testOldApiStillWorks() - { - var command: String - var logOutput: String - - command = "publish -PpublishMode=LOCAL -PnexusUsername=foo -PpublishUsername=foo" - logOutput = runGradleTask(command, "oldPublishApiTest") - assertTrue(logOutput.contains("publishMainPublicationToMavenLocalRepository"), "Didn't publish to local") - assertTrue(logOutput.contains("BUILD SUCCESSFUL"), "Wasn't successful") - - command = "publish -PpublishMode=STABLE -PnexusUsername=foo -PpublishUsername=foo" - logOutput = runGradleTask(command, "oldPublishApiTest") - // TODO: Update to Sonatype error -// assertTrue(logOutput.contains( -// "Could not write to resource 'https:///your-project/us/ihmc/your-project/0.1.0/your-project-0.1.0.jar'."), "Didn't publish to release") - assertTrue(logOutput.contains("BUILD FAILED")) - -// command = "publish -PpublishMode=SNAPSHOT -PnexusUsername=foo -PpublishUsername=foo" -// logOutput = runGradleTask(command, "oldPublishApiTest") -// assertTrue(logOutput.contains( -// "Could not write to resource")) -// assertTrue(logOutput.contains("BUILD FAILED")) - } - @Test fun testNewApi() { - var command: String - var logOutput: String - - logOutput = runGradleTask("publish -PnexusUsername=foo -PpublishUsername=foo", "publishApiTest") + var logOutput: String = runGradleTask("publish -PnexusUsername=foo -PpublishUsername=foo", "publishApiTest") assertTrue(logOutput.contains("publishMainPublicationToMavenLocalRepository")) assertTrue(logOutput.contains("BUILD SUCCESSFUL")) @@ -47,8 +19,8 @@ class PublishApiTest logOutput = runGradleTask("publish -PpublishUrl=LOCAL -PnexusUsername=foo -PpublishUsername=foo", "publishApiTest") assertTrue(logOutput.contains("publishMainPublicationToMavenLocalRepository")) assertTrue(logOutput.contains("BUILD SUCCESSFUL")) - - command = "publish -PpublishUrl=ihmcRelease -PnexusUsername=foo -PpublishUsername=foo" + + var command = "publish -PpublishUrl=ihmcRelease -PnexusUsername=foo -PpublishUsername=foo" logOutput = runGradleTask(command, "publishApiTest") // assertTrue(logOutput.contains( // "Could not write to resource 'https:///your-project/us/ihmc/your-project/0.1.0/your-project-0.1.0.jar")) @@ -59,18 +31,6 @@ class PublishApiTest // assertTrue(logOutput.contains( // "Could not write to resource 'https:///maven-vendor/your-project/us/ihmc/your-project/0.1.0/your-project-0.1.0.jar")) assertTrue(logOutput.contains("BUILD FAILED")) - -// command = "publish -PpublishUrl=ihmcSnapshots -PsnapshotMode=true -PnexusUsername=foo -PpublishUsername=foo" -// logOutput = runGradleTask(command, "publishApiTest") -// assertTrue(logOutput.contains( -// "Could not write to resource")) -// assertTrue(logOutput.contains("BUILD FAILED")) -// -// command = "publish -PpublishUrl=ihmcSnapshot -PsnapshotMode=true -PnexusUsername=foo -PpublishUsername=foo" -// logOutput = runGradleTask(command, "publishApiTest") -// assertTrue(logOutput.contains( -// "Could not write to resource")) -// assertTrue(logOutput.contains("BUILD FAILED")) } @Test diff --git a/tests/dependsOnSnapshot/build.gradle.kts b/tests/dependsOnSnapshot/build.gradle.kts deleted file mode 100644 index 8597f1f5..00000000 --- a/tests/dependsOnSnapshot/build.gradle.kts +++ /dev/null @@ -1,28 +0,0 @@ -plugins { - id("us.ihmc.ihmc-build") - id("us.ihmc.ihmc-ci") version "7.7" -} - -println testSuites.convertJobNameToHyphenatedName("AtlasAFast") - -nexusUsername = System.properties.getProperty("nexus.username") -nexusPassword = System.properties.getProperty("nexus.password") - -ihmc { - group = "us.ihmc" - version = "0.1.0" - vcsUrl = "https://your.vcs/url" - openSource = true - - configureDependencyResolution() - addPublishUrl("myVendor", "https://some.fake/my-open-vendor") - addPublishUrl("mySecureVendor", "https://some.fake/my-secure-vendor", "someUsername", "somePassword") - configurePublications() -} - -mainDependencies { - api("org.apache.commons:commons-lang3:3.12.0") -} - -testDependencies { -} diff --git a/tests/dependsOnSnapshot/gradle.properties b/tests/dependsOnSnapshot/gradle.properties deleted file mode 100644 index 58d68b3f..00000000 --- a/tests/dependsOnSnapshot/gradle.properties +++ /dev/null @@ -1,14 +0,0 @@ -kebabCasedName = depends-on-snapshot -pascalCasedName = DependsOnSnapshot -extraSourceSets = [] -publishUrl = local - -# When building from this directory, set how many directories -# to go up and do a search for more builds to include. -compositeSearchHeight = 0 - -# When another build is searching for builds to include, -# tell it to leave you out. -excludeFromCompositeBuild = false -nexusUsername = unset_username -nexusPassword = unset_password diff --git a/tests/dependsOnSnapshot/settings.gradle.kts b/tests/dependsOnSnapshot/settings.gradle.kts deleted file mode 100644 index 28d26c31..00000000 --- a/tests/dependsOnSnapshot/settings.gradle.kts +++ /dev/null @@ -1,20 +0,0 @@ -pluginManagement { - plugins { - id("us.ihmc.ihmc-build") version "0.29.7" - } -} - -buildscript { - repositories { - maven { url = uri("https://plugins.gradle.org/m2/") } - mavenLocal() - } - dependencies { - classpath("us.ihmc:ihmc-build:0.29.3") - } -} - -val ihmcSettingsConfigurator = us.ihmc.build.IHMCSettingsConfigurator(settings, logger, extra) -ihmcSettingsConfigurator.checkRequiredPropertiesAreSet() -ihmcSettingsConfigurator.configureExtraSourceSets() -ihmcSettingsConfigurator.findAndIncludeCompositeBuilds() diff --git a/tests/dependsOnSnapshot/src/main/java/us.ihmc/BasicTestApplication.java b/tests/dependsOnSnapshot/src/main/java/us.ihmc/BasicTestApplication.java deleted file mode 100644 index 1988298c..00000000 --- a/tests/dependsOnSnapshot/src/main/java/us.ihmc/BasicTestApplication.java +++ /dev/null @@ -1,11 +0,0 @@ -package us.ihmc; - -public class BasicTestApplication -{ - - - public static void main(String[] args) - { - System.out.println("Hello there. I'm some test code."); - } -} diff --git a/tests/dependsOnSnapshot/src/test/java/us/ihmc/BasicTestApplicationTest.java b/tests/dependsOnSnapshot/src/test/java/us/ihmc/BasicTestApplicationTest.java deleted file mode 100644 index 28388377..00000000 --- a/tests/dependsOnSnapshot/src/test/java/us/ihmc/BasicTestApplicationTest.java +++ /dev/null @@ -1,14 +0,0 @@ -package us.ihmc; - -import org.junit.Test; -import us.ihmc.continuousIntegration.ContinuousIntegrationAnnotations.ContinuousIntegrationTest; - -public class BasicTestApplicationTest -{ - @ContinuousIntegrationTest(estimatedDuration = 10) - @Test(timeout = 30000) - public void testThings() - { - System.out.println("Hello there. I'm some test code."); - } -} diff --git a/tests/dependsOnSnapshot/src/test/java/us/ihmc/generatedTestSuites/YourProjectAFastTestSuite.java b/tests/dependsOnSnapshot/src/test/java/us/ihmc/generatedTestSuites/YourProjectAFastTestSuite.java deleted file mode 100644 index 1bf449f7..00000000 --- a/tests/dependsOnSnapshot/src/test/java/us/ihmc/generatedTestSuites/YourProjectAFastTestSuite.java +++ /dev/null @@ -1,24 +0,0 @@ -package us.ihmc.generatedTestSuites; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite.SuiteClasses; - -import us.ihmc.continuousIntegration.ContinuousIntegrationSuite; -import us.ihmc.continuousIntegration.ContinuousIntegrationSuite.ContinuousIntegrationSuiteCategory; -import us.ihmc.continuousIntegration.IntegrationCategory; - -/** WARNING: AUTO-GENERATED FILE. DO NOT MAKE MANUAL CHANGES TO THIS FILE. **/ -@RunWith(ContinuousIntegrationSuite.class) -@ContinuousIntegrationSuiteCategory(IntegrationCategory.FAST) -@SuiteClasses -({ - us.ihmc.BasicTestApplicationTest.class -}) - -public class YourProjectAFastTestSuite -{ - public static void main(String[] args) - { - - } -} diff --git a/tests/generateTestSuitesTest/build.gradle.kts b/tests/generateTestSuitesTest/build.gradle.kts deleted file mode 100644 index 861556f7..00000000 --- a/tests/generateTestSuitesTest/build.gradle.kts +++ /dev/null @@ -1,28 +0,0 @@ -plugins { - id("us.ihmc.ihmc-build") - id("us.ihmc.ihmc-ci") version "7.7" -} - -// TODO: Fix up to test CI stuff maybe - -nexusUsername = System.properties.getProperty("nexus.username") -nexusPassword = System.properties.getProperty("nexus.password") - -ihmc { - group = "us.ihmc" - version = "0.1.0" - vcsUrl = "https://your.vcs/url" - openSource = true - - configureDependencyResolution() - addPublishUrl("myVendor", "https://some.fake/my-open-vendor") - addPublishUrl("mySecureVendor", "https://some.fake/my-secure-vendor", "someUsername", "somePassword") - configurePublications() -} - -mainDependencies { - api("org.apache.commons:commons-lang3:3.12.0") -} - -testDependencies { -} diff --git a/tests/generateTestSuitesTest/gradle.properties b/tests/generateTestSuitesTest/gradle.properties deleted file mode 100644 index 00a54f82..00000000 --- a/tests/generateTestSuitesTest/gradle.properties +++ /dev/null @@ -1,14 +0,0 @@ -kebabCasedName = your-project -pascalCasedName = YourProject -extraSourceSets = ["test"] -publishUrl = local - -# When building from this directory, set how many directories -# to go up and do a search for more builds to include. -compositeSearchHeight = 0 - -# When another build is searching for builds to include, -# tell it to leave you out. -excludeFromCompositeBuild = false -nexusUsername = unset_username -nexusPassword = unset_password diff --git a/tests/generateTestSuitesTest/settings.gradle.kts b/tests/generateTestSuitesTest/settings.gradle.kts deleted file mode 100644 index 28d26c31..00000000 --- a/tests/generateTestSuitesTest/settings.gradle.kts +++ /dev/null @@ -1,20 +0,0 @@ -pluginManagement { - plugins { - id("us.ihmc.ihmc-build") version "0.29.7" - } -} - -buildscript { - repositories { - maven { url = uri("https://plugins.gradle.org/m2/") } - mavenLocal() - } - dependencies { - classpath("us.ihmc:ihmc-build:0.29.3") - } -} - -val ihmcSettingsConfigurator = us.ihmc.build.IHMCSettingsConfigurator(settings, logger, extra) -ihmcSettingsConfigurator.checkRequiredPropertiesAreSet() -ihmcSettingsConfigurator.configureExtraSourceSets() -ihmcSettingsConfigurator.findAndIncludeCompositeBuilds() diff --git a/tests/generateTestSuitesTest/src/main/java/us.ihmc/BasicTestApplication.java b/tests/generateTestSuitesTest/src/main/java/us.ihmc/BasicTestApplication.java deleted file mode 100644 index 1988298c..00000000 --- a/tests/generateTestSuitesTest/src/main/java/us.ihmc/BasicTestApplication.java +++ /dev/null @@ -1,11 +0,0 @@ -package us.ihmc; - -public class BasicTestApplication -{ - - - public static void main(String[] args) - { - System.out.println("Hello there. I'm some test code."); - } -} diff --git a/tests/generateTestSuitesTest/src/test/java/us/ihmc/BasicTestApplicationTest.java b/tests/generateTestSuitesTest/src/test/java/us/ihmc/BasicTestApplicationTest.java deleted file mode 100644 index 28388377..00000000 --- a/tests/generateTestSuitesTest/src/test/java/us/ihmc/BasicTestApplicationTest.java +++ /dev/null @@ -1,14 +0,0 @@ -package us.ihmc; - -import org.junit.Test; -import us.ihmc.continuousIntegration.ContinuousIntegrationAnnotations.ContinuousIntegrationTest; - -public class BasicTestApplicationTest -{ - @ContinuousIntegrationTest(estimatedDuration = 10) - @Test(timeout = 30000) - public void testThings() - { - System.out.println("Hello there. I'm some test code."); - } -} diff --git a/tests/generateTestSuitesTest/src/test/java/us/ihmc/generatedTestSuites/YourProjectAFastTestSuite.java b/tests/generateTestSuitesTest/src/test/java/us/ihmc/generatedTestSuites/YourProjectAFastTestSuite.java deleted file mode 100644 index 1bf449f7..00000000 --- a/tests/generateTestSuitesTest/src/test/java/us/ihmc/generatedTestSuites/YourProjectAFastTestSuite.java +++ /dev/null @@ -1,24 +0,0 @@ -package us.ihmc.generatedTestSuites; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite.SuiteClasses; - -import us.ihmc.continuousIntegration.ContinuousIntegrationSuite; -import us.ihmc.continuousIntegration.ContinuousIntegrationSuite.ContinuousIntegrationSuiteCategory; -import us.ihmc.continuousIntegration.IntegrationCategory; - -/** WARNING: AUTO-GENERATED FILE. DO NOT MAKE MANUAL CHANGES TO THIS FILE. **/ -@RunWith(ContinuousIntegrationSuite.class) -@ContinuousIntegrationSuiteCategory(IntegrationCategory.FAST) -@SuiteClasses -({ - us.ihmc.BasicTestApplicationTest.class -}) - -public class YourProjectAFastTestSuite -{ - public static void main(String[] args) - { - - } -}