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