org.xtext.gradle.idea.tasks.IdeaRepository.xtend Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xtext-idea-gradle-plugin Show documentation
Show all versions of xtext-idea-gradle-plugin Show documentation
A plugin for for building IntelliJ IDEA Xtext plugins
package org.xtext.gradle.idea.tasks
import com.google.common.base.Charsets
import com.google.common.io.Files
import java.io.File
import org.gradle.api.tasks.Sync
import org.gradle.api.tasks.Input
import org.eclipse.xtend.lib.annotations.Accessors
class IdeaRepository extends Sync {
@Input @Accessors String rootUrl
val files = newArrayList
new() {
rootSpec.eachFile[files.add(file)]
}
override protected copy() {
super.copy()
val pluginDescriptor = new File(destinationDir, "updatePlugins.xml")
Files.write('''
«FOR it : files»
«ENDFOR»
''', pluginDescriptor, Charsets.UTF_8)
}
}