Wizard: remove extra line break in build files

This commit is contained in:
Ilya Kirillov
2020-10-11 00:28:36 +03:00
parent 9948c265df
commit 31dac65a39
14 changed files with 24 additions and 16 deletions
@@ -14,8 +14,6 @@ buildscript {
group = 'testGroupId'
version = '1.0-SNAPSHOT'
allprojects {
repositories {
google()
@@ -14,8 +14,6 @@ buildscript {
group = "testGroupId"
version = "1.0-SNAPSHOT"
allprojects {
repositories {
google()
@@ -70,6 +70,7 @@
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<artifactId>b</artifactId>
@@ -93,4 +94,5 @@
<version>KOTLIN_VERSION</version>
</dependency>
</dependencies>
</project>
@@ -70,6 +70,7 @@
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<artifactId>c</artifactId>
@@ -93,4 +94,5 @@
<version>KOTLIN_VERSION</version>
</dependency>
</dependencies>
</project>
@@ -1,8 +1,6 @@
group = 'testGroupId'
version = '1.0-SNAPSHOT'
allprojects {
repositories {
mavenCentral()
@@ -1,8 +1,6 @@
group = "testGroupId"
version = "1.0-SNAPSHOT"
allprojects {
repositories {
mavenCentral()
@@ -70,6 +70,7 @@
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
@@ -83,4 +84,5 @@
<version>KOTLIN_VERSION</version>
</dependency>
</dependencies>
</project>
@@ -70,6 +70,7 @@
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<artifactId>a</artifactId>
@@ -88,4 +89,5 @@
<version>KOTLIN_VERSION</version>
</dependency>
</dependencies>
</project>
@@ -70,6 +70,7 @@
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<artifactId>b</artifactId>
@@ -88,4 +89,5 @@
<version>KOTLIN_VERSION</version>
</dependency>
</dependencies>
</project>
@@ -70,6 +70,7 @@
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<artifactId>a</artifactId>
@@ -88,4 +89,5 @@
<version>KOTLIN_VERSION</version>
</dependency>
</dependencies>
</project>
@@ -70,6 +70,7 @@
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
@@ -83,4 +84,5 @@
<version>KOTLIN_VERSION</version>
</dependency>
</dependencies>
</project>
@@ -14,8 +14,6 @@ buildscript {
group = 'me.user'
version = '1.0-SNAPSHOT'
allprojects {
repositories {
google()
@@ -14,8 +14,6 @@ buildscript {
group = "me.user"
version = "1.0-SNAPSHOT"
allprojects {
repositories {
google()
@@ -57,17 +57,19 @@ data class BuildFileIR(
sectionCall("dependencies", buildScriptIrs.filterIsInstance<BuildScriptDependencyIR>())
}
}
sectionCall("plugins", irsOfType<BuildSystemPluginIR>()); nl(lineBreaks = 2)
sectionCall("plugins", irsOfType<BuildSystemPluginIR>()); nl(lineBreaks = 1)
if (renderPomIr) {
pom.render(this); nl()
nl()
pom.render(this)
}
distinctRepositories().takeIf { it.isNotEmpty() }?.let { repositories ->
nl()
sectionCall("repositories", repositories)
nl(lineBreaks = 2)
nl()
}
modules.render(this)
irsOfTypeOrNull<FreeIR>()?.let { freeIrs ->
nl(2)
nl()
freeIrs.listNl(lineBreaks = 2)
}.ignore()
}
@@ -145,6 +147,7 @@ data class MultiplatformModulesStructureIR(
override fun withReplacedIrs(irs: PersistentList<BuildSystemIR>): MultiplatformModulesStructureIR = copy(irs = irs)
override fun GradlePrinter.renderGradle() {
nl()
sectionCall("kotlin") {
targets.filterNot {
it.safeAs<DefaultTargetConfigurationIR>()?.targetAccess?.type == ModuleSubType.common
@@ -154,6 +157,7 @@ data class MultiplatformModulesStructureIR(
modules.listNl()
}
}
nl()
}
}
@@ -182,7 +186,9 @@ data class SingleplatformModulesStructureWithSingleModuleIR(
copy(module = modules.single() as SingleplatformModuleIR)
override fun BuildFilePrinter.render() {
nl()
module.render(this)
nl()
}
}