aboutsummaryrefslogtreecommitdiff
path: root/atomicfu-maven-plugin/build.gradle
diff options
context:
space:
mode:
Diffstat (limited to 'atomicfu-maven-plugin/build.gradle')
-rw-r--r--atomicfu-maven-plugin/build.gradle26
1 files changed, 6 insertions, 20 deletions
diff --git a/atomicfu-maven-plugin/build.gradle b/atomicfu-maven-plugin/build.gradle
index 8929be9..a165769 100644
--- a/atomicfu-maven-plugin/build.gradle
+++ b/atomicfu-maven-plugin/build.gradle
@@ -18,7 +18,7 @@ dependencies {
}
def pomFile = file("$buildDir/pom.xml")
-def outputDir = compileKotlin.destinationDir
+def outputDir = compileKotlin.destinationDirectory
def buildSnapshots = rootProject.properties['build_snapshot_train'] != null
evaluationDependsOn(':atomicfu-transformer')
@@ -37,32 +37,17 @@ task generatePomFile(dependsOn: [compileKotlin, ':atomicfu-transformer:publishTo
asNode().with {
appendNode('build').with {
appendNode('directory', buildDir)
- appendNode('outputDirectory', outputDir)
+ appendNode('outputDirectory', outputDir.get().getAsFile())
}
appendNode('properties').with {
appendNode('project.build.sourceEncoding', 'UTF-8')
}
appendNode('repositories').with {
appendNode('repository').with {
- appendNode('id', 'kotlin-eap')
- appendNode('url', 'https://kotlin.bintray.com/kotlin-eap')
- }
-
- appendNode('repository').with {
- appendNode('id', 'kotlin-dev')
- appendNode('url', 'https://kotlin.bintray.com/kotlin-dev')
- }
-
- appendNode('repository').with {
appendNode('id', 'dev')
appendNode('url', 'https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev')
}
- appendNode('repository').with {
- appendNode('id', 'kotlinx')
- appendNode('url', 'https://kotlin.bintray.com/kotlinx')
- }
-
if (buildSnapshots) {
appendNode('repository').with {
appendNode('id', 'kotlin-snapshots')
@@ -84,7 +69,7 @@ String mavenRepoLocal = System.getProperty("maven.repo.local")
// runs the plugin description generator
task generatePluginDescriptor(type: Exec, dependsOn: generatePomFile) {
- def pluginDescriptorFile = new File(outputDir, 'META-INF/maven/plugin.xml')
+ def pluginDescriptorFile = outputDir.file('META-INF/maven/plugin.xml')
workingDir projectDir
boolean isWindows = System.getProperty("os.name").toLowerCase().indexOf("windows") >= 0
@@ -100,8 +85,9 @@ task generatePluginDescriptor(type: Exec, dependsOn: generatePomFile) {
])
commandLine args
doLast {
- assert pluginDescriptorFile.file, "$pluginDescriptorFile: was not generated"
- logger.info("Plugin descriptor is generated in $pluginDescriptorFile")
+ def descriptorFile = pluginDescriptorFile.get().getAsFile()
+ assert descriptorFile, "$descriptorFile: was not generated"
+ logger.info("Plugin descriptor is generated in $descriptorFile")
}
}