fix compilation
This commit is contained in:
committed by
Natalia Ukhorskaya
parent
140bbe28fd
commit
4e99a61aea
@@ -21,10 +21,9 @@
|
|||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.android.tools.build</groupId>
|
<groupId>commons-io</groupId>
|
||||||
<artifactId>gradle</artifactId>
|
<artifactId>commons-io</artifactId>
|
||||||
<version>0.4.2</version>
|
<version>2.4</version>
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jetbrains.kotlin</groupId>
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
@@ -32,21 +31,6 @@
|
|||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>commons-lang</groupId>
|
|
||||||
<artifactId>commons-lang</artifactId>
|
|
||||||
<version>2.3</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.google.guava</groupId>
|
|
||||||
<artifactId>guava</artifactId>
|
|
||||||
<version>12.0</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.directory.studio</groupId>
|
|
||||||
<artifactId>org.apache.commons.io</artifactId>
|
|
||||||
<version>2.4</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jetbrains.kotlin</groupId>
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
<artifactId>gradle-api</artifactId>
|
<artifactId>gradle-api</artifactId>
|
||||||
@@ -73,12 +57,6 @@
|
|||||||
<artifactId>kotlin-stdlib</artifactId>
|
<artifactId>kotlin-stdlib</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.codehaus.gmaven</groupId>
|
|
||||||
<artifactId>gmaven-plugin</artifactId>
|
|
||||||
<version>1.5</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
||||||
@@ -102,32 +80,6 @@
|
|||||||
</resources>
|
</resources>
|
||||||
|
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.gmaven</groupId>
|
|
||||||
<artifactId>gmaven-plugin</artifactId>
|
|
||||||
<version>1.5</version>
|
|
||||||
<configuration>
|
|
||||||
<providerSelection>2.0</providerSelection>
|
|
||||||
<source/>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>process-sources</phase>
|
|
||||||
<goals> <goal>compile</goal></goals>
|
|
||||||
<configuration>
|
|
||||||
<sources>
|
|
||||||
<fileset>
|
|
||||||
<directory>${project.basedir}/src/main/kotlin</directory>
|
|
||||||
<includes>
|
|
||||||
<include>**/*.groovy</include>
|
|
||||||
</includes>
|
|
||||||
</fileset>
|
|
||||||
</sources>
|
|
||||||
<outputDirectory>${project.build.outputDirectory}/../groovyOutput</outputDirectory>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>kotlin-maven-plugin</artifactId>
|
<artifactId>kotlin-maven-plugin</artifactId>
|
||||||
<groupId>org.jetbrains.kotlin</groupId>
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
@@ -143,12 +95,6 @@
|
|||||||
<id>compile</id>
|
<id>compile</id>
|
||||||
<phase>compile</phase>
|
<phase>compile</phase>
|
||||||
<goals> <goal>compile</goal> </goals>
|
<goals> <goal>compile</goal> </goals>
|
||||||
<configuration>
|
|
||||||
<sourceDirs>
|
|
||||||
<sourceDir>${project.basedir}/src/main/kotlin</sourceDir>
|
|
||||||
<sourceDir>${project.build.outputDirectory}/../groovyOutput</sourceDir>
|
|
||||||
</sourceDirs>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
</execution>
|
||||||
|
|
||||||
<execution>
|
<execution>
|
||||||
|
|||||||
+2
-4
@@ -20,7 +20,6 @@ import org.gradle.api.logging.Logger
|
|||||||
import org.gradle.api.logging.Logging
|
import org.gradle.api.logging.Logging
|
||||||
import org.apache.commons.lang.StringUtils
|
import org.apache.commons.lang.StringUtils
|
||||||
import org.apache.commons.io.FileUtils
|
import org.apache.commons.io.FileUtils
|
||||||
import org.jetbrains.kotlin.gradle.plugin.*
|
|
||||||
import org.gradle.api.Project
|
import org.gradle.api.Project
|
||||||
import org.jetbrains.jet.config.Services
|
import org.jetbrains.jet.config.Services
|
||||||
import org.jetbrains.jet.cli.js.K2JSCompiler
|
import org.jetbrains.jet.cli.js.K2JSCompiler
|
||||||
@@ -32,6 +31,7 @@ import com.intellij.ide.highlighter.JavaFileType
|
|||||||
import org.jetbrains.jet.plugin.JetFileType
|
import org.jetbrains.jet.plugin.JetFileType
|
||||||
import org.jetbrains.jet.utils.LibraryUtils
|
import org.jetbrains.jet.utils.LibraryUtils
|
||||||
|
|
||||||
|
val DEFAULT_ANNOTATIONS = "org.jebrains.kotlin.gradle.defaultAnnotations"
|
||||||
|
|
||||||
abstract class AbstractKotlinCompile<T : CommonCompilerArguments>() : AbstractCompile() {
|
abstract class AbstractKotlinCompile<T : CommonCompilerArguments>() : AbstractCompile() {
|
||||||
abstract protected val compiler: CLICompiler<T>
|
abstract protected val compiler: CLICompiler<T>
|
||||||
@@ -159,11 +159,9 @@ public open class KotlinCompile() : AbstractKotlinCompile<K2JVMCompilerArguments
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun findSrcDirRoot(file: File): File? {
|
fun findSrcDirRoot(file: File): File? {
|
||||||
val absPath = file.getAbsolutePath()
|
|
||||||
for (source in srcDirsSources) {
|
for (source in srcDirsSources) {
|
||||||
for (root in source.getSrcDirs()) {
|
for (root in source.getSrcDirs()) {
|
||||||
val rootAbsPath = root.getAbsolutePath()
|
if (FileUtils.directoryContains(root, file)) {
|
||||||
if (FilenameUtils.directoryContains(rootAbsPath, absPath)) {
|
|
||||||
return root
|
return root
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,10 +30,16 @@
|
|||||||
<artifactId>kotlin-js-library</artifactId>
|
<artifactId>kotlin-js-library</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.android.tools.build</groupId>
|
||||||
|
<artifactId>gradle</artifactId>
|
||||||
|
<version>0.4.2</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jetbrains.kotlin</groupId>
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
<artifactId>gradle-api</artifactId>
|
<artifactId>gradle-api</artifactId>
|
||||||
<version>1.4</version>
|
<version>1.6</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -78,6 +84,12 @@
|
|||||||
<id>compile</id>
|
<id>compile</id>
|
||||||
<phase>compile</phase>
|
<phase>compile</phase>
|
||||||
<goals> <goal>compile</goal> </goals>
|
<goals> <goal>compile</goal> </goals>
|
||||||
|
<configuration>
|
||||||
|
<sourceDirs>
|
||||||
|
<sourceDir>${project.basedir}/src/main/kotlin</sourceDir>
|
||||||
|
<sourceDir>${project.build.outputDirectory}/../groovyOutput</sourceDir>
|
||||||
|
</sourceDirs>
|
||||||
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
|
|
||||||
<execution>
|
<execution>
|
||||||
@@ -124,6 +136,32 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.gmaven</groupId>
|
||||||
|
<artifactId>gmaven-plugin</artifactId>
|
||||||
|
<version>1.5</version>
|
||||||
|
<configuration>
|
||||||
|
<providerSelection>2.0</providerSelection>
|
||||||
|
<source/>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>process-sources</phase>
|
||||||
|
<goals> <goal>compile</goal></goals>
|
||||||
|
<configuration>
|
||||||
|
<sources>
|
||||||
|
<fileset>
|
||||||
|
<directory>${project.basedir}/src/main/kotlin</directory>
|
||||||
|
<includes>
|
||||||
|
<include>**/*.groovy</include>
|
||||||
|
</includes>
|
||||||
|
</fileset>
|
||||||
|
</sources>
|
||||||
|
<outputDirectory>${project.build.outputDirectory}/../groovyOutput</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user