Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
硅谷海盗
kotlin
提交
1862c78b
K
kotlin
项目概览
硅谷海盗
/
kotlin
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kotlin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1862c78b
编写于
9月 13, 2017
作者:
I
Ilya Chernikov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix projects for gradle integration tests
上级
8ec5cc7d
变更
23
隐藏空白更改
内联
并排
Showing
23 changed file
with
185 addition
and
90 deletion
+185
-90
build-common/build.gradle.kts
build-common/build.gradle.kts
+9
-7
buildSrc/src/main/kotlin/artifacts.kt
buildSrc/src/main/kotlin/artifacts.kt
+14
-0
buildSrc/src/main/kotlin/sourceSets.kt
buildSrc/src/main/kotlin/sourceSets.kt
+8
-0
compiler.tests-common/build.gradle.kts
compiler.tests-common/build.gradle.kts
+1
-1
compiler/build.gradle.kts
compiler/build.gradle.kts
+1
-1
compiler/compiler-runner/build.gradle.kts
compiler/compiler-runner/build.gradle.kts
+7
-13
compiler/daemon/daemon-client/build.gradle.kts
compiler/daemon/daemon-client/build.gradle.kts
+1
-4
compiler/daemon/daemon-common/build.gradle.kts
compiler/daemon/daemon-common/build.gradle.kts
+0
-1
gradle/project-schema.json
gradle/project-schema.json
+48
-11
idea/build.gradle.kts
idea/build.gradle.kts
+1
-5
idea/idea-core/build.gradle.kts
idea/idea-core/build.gradle.kts
+1
-1
libraries/tools/kotlin-gradle-plugin-integration-tests/build.gradle
...tools/kotlin-gradle-plugin-integration-tests/build.gradle
+4
-0
libraries/tools/kotlin-gradle-plugin/build.gradle
libraries/tools/kotlin-gradle-plugin/build.gradle
+2
-3
plugins/android-extensions/android-extensions-compiler/build.gradle.kts
...d-extensions/android-extensions-compiler/build.gradle.kts
+1
-3
plugins/android-extensions/android-extensions-idea/build.gradle.kts
...droid-extensions/android-extensions-idea/build.gradle.kts
+1
-1
plugins/android-extensions/android-extensions-jps/build.gradle.kts
...ndroid-extensions/android-extensions-jps/build.gradle.kts
+1
-1
plugins/android-extensions/android-extensions-runtime/build.gradle.kts
...id-extensions/android-extensions-runtime/build.gradle.kts
+3
-17
plugins/plugins-tests/build.gradle.kts
plugins/plugins-tests/build.gradle.kts
+1
-1
prepare/android-extensions-compiler-gradle/build.gradle.kts
prepare/android-extensions-compiler-gradle/build.gradle.kts
+72
-0
prepare/compiler/build.gradle.kts
prepare/compiler/build.gradle.kts
+2
-15
prepare/kotlin-plugin/build.gradle.kts
prepare/kotlin-plugin/build.gradle.kts
+1
-1
settings.gradle
settings.gradle
+3
-1
ultimate/build.gradle.kts
ultimate/build.gradle.kts
+3
-3
未找到文件。
build-common/build.gradle.kts
浏览文件 @
1862c78b
...
...
@@ -4,13 +4,13 @@ description = "Kotlin Build Common"
apply
{
plugin
(
"kotlin"
)
}
dependencies
{
compile
(
project
(
":core:util.runtime"
))
compile
(
project
(
":compiler:util"
))
compile
(
project
(
":compiler:cli-common"
))
compile
(
project
(
":compiler:frontend.java"
))
compile
(
project
(
":js:js.serializer"
))
compile
(
project
(
":js:js.frontend"
))
compile
(
ideaSdkDeps
(
"util"
))
compile
Only
(
project
(
":core:util.runtime"
))
compile
Only
(
project
(
":compiler:util"
))
compile
Only
(
project
(
":compiler:cli-common"
))
compile
Only
(
project
(
":compiler:frontend.java"
))
compile
Only
(
project
(
":js:js.serializer"
))
compile
Only
(
project
(
":js:js.frontend"
))
compile
Only
(
ideaSdkDeps
(
"util"
))
testCompile
(
commonDep
(
"junit:junit"
))
testCompile
(
project
(
":compiler.tests-common"
))
testCompile
(
protobufFull
())
...
...
@@ -28,3 +28,5 @@ runtimeJar()
testsJar
()
projectTest
()
publish
()
\ No newline at end of file
buildSrc/src/main/kotlin/artifacts.kt
浏览文件 @
1862c78b
...
...
@@ -18,6 +18,11 @@ import java.io.File
// can be used now only for the non-published projects, due to conflicts in the "archives" config
// TODO: fix the problem above
fun
Project
.
classesDirsArtifact
():
FileCollection
{
task
(
"uploadArchives"
)
{
// hides rule-based task with the same name, which appears to be broken in this project
}
val
classesDirsCfg
=
configurations
.
getOrCreate
(
"classes-dirs"
)
val
classesDirs
=
the
<
JavaPluginConvention
>().
sourceSets
[
"main"
].
output
.
classesDirs
...
...
@@ -47,6 +52,10 @@ fun Project.testsJar(body: Jar.() -> Unit = {}): Jar {
}
}
fun
Project
.
noDefaultJar
()
{
tasks
.
findByName
(
"jar"
)
?.
enabled
=
false
}
fun
<
T
>
Project
.
runtimeJarArtifactBy
(
task
:
Task
,
artifactRef
:
T
,
body
:
ConfigurablePublishArtifact
.()
->
Unit
=
{})
{
addArtifact
(
"archives"
,
task
,
artifactRef
,
body
)
addArtifact
(
"runtimeJar"
,
task
,
artifactRef
,
body
)
...
...
@@ -108,6 +117,11 @@ fun Project.standardPublicJars(): Unit {
fun
Project
.
publish
(
body
:
Upload
.()
->
Unit
=
{}):
Upload
{
apply
<
plugins
.
PublishedKotlinModule
>()
afterEvaluate
{
if
(
configurations
.
findByName
(
"classes-dirs"
)
!=
null
)
throw
GradleException
(
"classesDirsArtifact() is incompatible with publish(), see sources comments for details"
)
}
return
(
tasks
.
getByName
(
"uploadArchives"
)
as
Upload
).
apply
{
body
()
}
...
...
buildSrc/src/main/kotlin/sourceSets.kt
浏览文件 @
1862c78b
...
...
@@ -52,3 +52,11 @@ fun SourceSet.projectDefault() {
//
//fun SourceSet.kotlin(action: SourceDirectorySet.() -> Unit) =
// kotlin.action()
fun
Project
.
getSourceSetsFrom
(
projectPath
:
String
):
SourceSetContainer
{
evaluationDependsOn
(
projectPath
)
return
project
(
projectPath
).
the
<
JavaPluginConvention
>().
sourceSets
}
compiler.tests-common/build.gradle.kts
浏览文件 @
1862c78b
...
...
@@ -21,7 +21,7 @@ dependencies {
compile
(
project
(
":js:js.serializer"
))
compile
(
project
(
":js:js.frontend"
))
compile
(
project
(
":js:js.translator"
))
compile
(
project
(
"
:android-extensions-compiler"
))
compile
Only
(
project
(
":plugins
:android-extensions-compiler"
))
compile
(
project
(
":kotlin-test:kotlin-test-jvm"
))
compile
(
commonDep
(
"junit:junit"
))
compile
(
ideaSdkCoreDeps
(
"intellij-core"
))
...
...
compiler/build.gradle.kts
浏览文件 @
1862c78b
...
...
@@ -31,7 +31,7 @@ val testDistProjects = listOf(
":kotlin-test:kotlin-test-js"
,
":kotlin-daemon-client"
,
":kotlin-preloader"
,
":android-extensions-compiler"
,
":
plugins:
android-extensions-compiler"
,
":kotlin-ant"
)
dependencies
{
...
...
compiler/compiler-runner/build.gradle.kts
浏览文件 @
1862c78b
...
...
@@ -5,18 +5,14 @@ apply { plugin("kotlin") }
jvmTarget
=
"1.6"
val
packIntoJar
by
configurations
.
creating
dependencies
{
val
compile
by
configurations
compile
(
project
(
":kotlin-build-common"
))
compile
(
project
(
":compiler:cli-common"
))
compile
(
project
(
":kotlin-preloader"
))
compile
(
project
(
":compiler:frontend.java"
))
compile
(
project
(
":compiler:daemon-common"
))
compile
Only
(
project
(
":compiler:cli-common"
))
compile
Only
(
project
(
":kotlin-preloader"
))
compile
Only
(
project
(
":compiler:frontend.java"
))
compile
Only
(
project
(
":compiler:daemon-common"
))
compile
(
project
(
":kotlin-daemon-client"
))
compile
(
project
(
":compiler:util"
))
packIntoJar
(
projectClasses
(
":compiler:daemon-common"
))
compileOnly
(
project
(
":compiler:util"
))
}
sourceSets
{
...
...
@@ -24,11 +20,9 @@ sourceSets {
"test"
{}
}
evaluationDependsOn
(
":kotlin-daemon-client"
)
runtimeJar
{
from
(
packIntoJar
)
from
(
project
(
":kotlin-daemon-client"
).
the
<
JavaPluginConvention
>().
sourceSets
[
"main"
].
output
.
classesDirs
)
from
(
getSourceSetsFrom
(
":kotlin-daemon-client"
)[
"main"
].
output
.
classesDirs
)
from
(
getSourceSetsFrom
(
":compiler:daemon-common"
)
[
"main"
].
output
.
classesDirs
)
}
sourcesJar
()
javadocJar
()
...
...
compiler/daemon/daemon-client/build.gradle.kts
浏览文件 @
1862c78b
...
...
@@ -7,14 +7,11 @@ jvmTarget = "1.6"
val
nativePlatformUberjar
=
preloadedDeps
(
"native-platform-uberjar"
)
val
packIntoJar
by
configurations
.
creating
dependencies
{
compileOnly
(
project
(
":compiler:util"
))
compileOnly
(
project
(
":compiler:cli-common"
))
compileOnly
(
project
(
":compiler:daemon-common"
))
compileOnly
(
nativePlatformUberjar
)
packIntoJar
(
projectClasses
(
":compiler:daemon-common"
))
}
sourceSets
{
...
...
@@ -26,7 +23,7 @@ runtimeJar {
nativePlatformUberjar
.
forEach
{
from
(
zipTree
(
it
))
}
from
(
packIntoJar
)
from
(
getSourceSetsFrom
(
":compiler:daemon-common"
)[
"main"
].
output
.
classesDirs
)
}
sourcesJar
()
javadocJar
()
...
...
compiler/daemon/daemon-common/build.gradle.kts
浏览文件 @
1862c78b
...
...
@@ -16,4 +16,3 @@ sourceSets {
"test"
{}
}
classesDirsArtifact
()
gradle/project-schema.json
浏览文件 @
1862c78b
...
...
@@ -53,7 +53,8 @@
":android-extensions-compiler"
:
{
"conventions"
:
{
"base"
:
"org.gradle.api.plugins.BasePluginConvention"
,
"java"
:
"org.gradle.api.plugins.JavaPluginConvention"
"java"
:
"org.gradle.api.plugins.JavaPluginConvention"
,
"maven"
:
"org.gradle.api.plugins.MavenPluginConvention"
},
"configurations"
:
[
"apiElements"
,
...
...
@@ -63,16 +64,15 @@
"compileClasspath"
,
"compileOnly"
,
"default"
,
"distJar"
,
"implementation"
,
"kapt"
,
"kaptTest"
,
"packIntoJar"
,
"runtime"
,
"runtimeClasspath"
,
"runtimeElements"
,
"runtimeJar"
,
"runtimeOnly"
,
"signatures"
,
"testCompile"
,
"testCompileClasspath"
,
"testCompileOnly"
,
...
...
@@ -86,7 +86,8 @@
"kotlin"
:
"org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension"
,
"kapt"
:
"org.jetbrains.kotlin.gradle.plugin.KaptExtension"
,
"defaultArtifacts"
:
"org.gradle.api.internal.plugins.DefaultArtifactPublicationSet"
,
"reporting"
:
"org.gradle.api.reporting.ReportingExtension"
"reporting"
:
"org.gradle.api.reporting.ReportingExtension"
,
"signing"
:
"org.gradle.plugins.signing.SigningExtension"
}
},
":android-lint"
:
{
...
...
@@ -547,7 +548,6 @@
"apiElements"
,
"archives"
,
"buildVersion"
,
"classes-dirs"
,
"compile"
,
"compileClasspath"
,
"compileOnly"
,
...
...
@@ -699,7 +699,8 @@
":kotlin-build-common"
:
{
"conventions"
:
{
"base"
:
"org.gradle.api.plugins.BasePluginConvention"
,
"java"
:
"org.gradle.api.plugins.JavaPluginConvention"
"java"
:
"org.gradle.api.plugins.JavaPluginConvention"
,
"maven"
:
"org.gradle.api.plugins.MavenPluginConvention"
},
"configurations"
:
[
"apiElements"
,
...
...
@@ -717,6 +718,7 @@
"runtimeElements"
,
"runtimeJar"
,
"runtimeOnly"
,
"signatures"
,
"testCompile"
,
"testCompileClasspath"
,
"testCompileOnly"
,
...
...
@@ -731,7 +733,8 @@
"kotlin"
:
"org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension"
,
"kapt"
:
"org.jetbrains.kotlin.gradle.plugin.KaptExtension"
,
"defaultArtifacts"
:
"org.gradle.api.internal.plugins.DefaultArtifactPublicationSet"
,
"reporting"
:
"org.gradle.api.reporting.ReportingExtension"
"reporting"
:
"org.gradle.api.reporting.ReportingExtension"
,
"signing"
:
"org.gradle.plugins.signing.SigningExtension"
}
},
":kotlin-compiler"
:
{
...
...
@@ -873,7 +876,6 @@
"implementation"
,
"kapt"
,
"kaptTest"
,
"packIntoJar"
,
"runtime"
,
"runtimeClasspath"
,
"runtimeElements"
,
...
...
@@ -907,7 +909,6 @@
"apiElements"
,
"archives"
,
"buildVersion"
,
"classes-dirs"
,
"compile"
,
"compileClasspath"
,
"compileOnly"
,
...
...
@@ -916,7 +917,6 @@
"implementation"
,
"kapt"
,
"kaptTest"
,
"packIntoJar"
,
"runtime"
,
"runtimeClasspath"
,
"runtimeElements"
,
...
...
@@ -2218,7 +2218,6 @@
"configurations"
:
[
"apiElements"
,
"archives"
,
"classes-dirs"
,
"compile"
,
"compileClasspath"
,
"compileOnly"
,
...
...
@@ -3830,6 +3829,44 @@
"signing"
:
"org.gradle.plugins.signing.SigningExtension"
}
},
":plugins:android-extensions-compiler"
:
{
"conventions"
:
{
"base"
:
"org.gradle.api.plugins.BasePluginConvention"
,
"java"
:
"org.gradle.api.plugins.JavaPluginConvention"
},
"configurations"
:
[
"apiElements"
,
"archives"
,
"buildVersion"
,
"compile"
,
"compileClasspath"
,
"compileOnly"
,
"default"
,
"distJar"
,
"implementation"
,
"kapt"
,
"kaptTest"
,
"runtime"
,
"runtimeClasspath"
,
"runtimeElements"
,
"runtimeJar"
,
"runtimeOnly"
,
"testCompile"
,
"testCompileClasspath"
,
"testCompileOnly"
,
"testImplementation"
,
"testRuntime"
,
"testRuntimeClasspath"
,
"testRuntimeOnly"
],
"extensions"
:
{
"ext"
:
"org.gradle.api.plugins.ExtraPropertiesExtension"
,
"kotlin"
:
"org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension"
,
"kapt"
:
"org.jetbrains.kotlin.gradle.plugin.KaptExtension"
,
"defaultArtifacts"
:
"org.gradle.api.internal.plugins.DefaultArtifactPublicationSet"
,
"reporting"
:
"org.gradle.api.reporting.ReportingExtension"
}
},
":plugins:android-extensions-ide"
:
{
"conventions"
:
{
"base"
:
"org.gradle.api.plugins.BasePluginConvention"
,
...
...
idea/build.gradle.kts
浏览文件 @
1862c78b
...
...
@@ -66,7 +66,7 @@ dependencies {
testRuntime
(
ideaPluginDeps
(
"*.jar"
,
plugin
=
"android"
))
// deps below are test runtime deps, but made test compile to split compilation and running to reduce mem req
testCompile
(
project
(
":android-extensions-compiler"
))
testCompile
(
project
(
":
plugins:
android-extensions-compiler"
))
testCompile
(
project
(
":plugins:android-extensions-ide"
))
{
isTransitive
=
false
}
testCompile
(
project
(
":allopen-ide-plugin"
))
{
isTransitive
=
false
}
testCompile
(
project
(
":kotlin-allopen-compiler-plugin"
))
...
...
@@ -108,7 +108,3 @@ testsJar {}
classesDirsArtifact
()
task
(
"uploadArchives"
)
{
// hides rule-based task with the same name, which appears to be broken in this project
}
idea/idea-core/build.gradle.kts
浏览文件 @
1862c78b
...
...
@@ -11,7 +11,7 @@ dependencies {
compile
(
project
(
":j2k"
))
compile
(
project
(
":idea:ide-common"
))
compile
(
project
(
":idea:idea-jps-common"
))
compile
(
project
(
":android-extensions-compiler"
))
compile
(
project
(
":
plugins:
android-extensions-compiler"
))
compile
(
ideaSdkCoreDeps
(
"intellij-core"
,
"util"
))
compile
(
ideaSdkDeps
(
"openapi"
,
"idea"
))
compile
(
ideaPluginDeps
(
"gradle-tooling-api"
,
"gradle"
,
plugin
=
"gradle"
))
...
...
libraries/tools/kotlin-gradle-plugin-integration-tests/build.gradle
浏览文件 @
1862c78b
...
...
@@ -13,11 +13,15 @@ dependencies {
testCompile
project
(
':kotlin-gradle-plugin'
).
sourceSets
.
test
.
output
testCompile
project
(
':kotlin-gradle-subplugin-example'
)
testCompile
project
(
':kotlin-allopen'
)
testCompile
project
(
':kotlin-test:kotlin-test-jvm'
)
testCompile
project
(
path:
':kotlin-compiler-embeddable'
,
configuration:
'runtimeJar'
)
testCompile
project
(
path:
':examples:annotation-processor-example'
)
testCompile
project
(
':kotlin-stdlib-jre8'
)
testCompile
project
(
':kotlin-reflect'
)
testCompile
project
(
':android-extensions-compiler'
)
testCompile
project
(
path:
':kotlin-build-common'
,
configuration:
'tests-jar'
)
testCompile
project
(
path:
':compiler:incremental-compilation-impl'
,
configuration:
'tests-jar'
)
testCompile
'org.jetbrains.kotlin:gradle-api:2.2'
}
...
...
libraries/tools/kotlin-gradle-plugin/build.gradle
浏览文件 @
1862c78b
...
...
@@ -28,14 +28,13 @@ configurations {
dependencies
{
compile
project
(
':kotlin-gradle-plugin-api'
)
compile
project
(
path:
':kotlin-compiler-embeddable'
,
configuration:
"runtimeJar"
)
compile
project
(
':kotlin-stdlib'
)
compile
project
(
':android-extensions-compiler'
)
// compile project(path: ':compiler', configuration: 'embeddableCompilerJar')
compile
project
(
':kotlin-build-common'
)
compile
project
(
':kotlin-compiler-runner'
)
compile
project
(
":compiler:incremental-compilation-impl"
)
compile
project
(
":compiler:daemon"
)
// compileOnly project(":compiler:daemon")
compile
project
(
path:
':kotlin-annotation-processing-gradle'
,
configuration:
"runtimeJar"
)
compileOnly
'com.android.tools.build:gradle:2.0.0'
...
...
plugins/android-extensions/android-extensions-compiler/build.gradle.kts
浏览文件 @
1862c78b
...
...
@@ -18,10 +18,8 @@ sourceSets {
"test"
{}
}
evaluationDependsOn
(
":kotlin-android-extensions-runtime"
)
runtimeJar
{
from
(
project
(
":kotlin-android-extensions-runtime"
).
the
<
JavaPluginConvention
>().
sourceSets
[
"main"
].
output
.
classesDirs
)
from
(
getSourceSetsFrom
(
":kotlin-android-extensions-runtime"
)
[
"main"
].
output
.
classesDirs
)
}
dist
()
...
...
plugins/android-extensions/android-extensions-idea/build.gradle.kts
浏览文件 @
1862c78b
...
...
@@ -9,7 +9,7 @@ dependencies {
compile
(
project
(
":idea:idea-core"
))
compile
(
project
(
":idea"
))
compile
(
project
(
":idea:idea-gradle"
))
compile
(
project
(
":android-extensions-compiler"
))
compile
(
project
(
":
plugins:
android-extensions-compiler"
))
compile
(
ideaPluginDeps
(
"android"
,
"sdk-tools"
,
"sdk-common"
,
plugin
=
"android"
))
compile
(
ideaPluginDeps
(
"Groovy"
,
plugin
=
"Groovy"
))
testCompile
(
project
(
":compiler.tests-common"
))
...
...
plugins/android-extensions/android-extensions-jps/build.gradle.kts
浏览文件 @
1862c78b
...
...
@@ -4,7 +4,7 @@ apply { plugin("kotlin") }
dependencies
{
compile
(
project
(
":compiler:util"
))
compile
(
project
(
":jps-plugin"
))
compile
(
project
(
":android-extensions-compiler"
))
compile
(
project
(
":
plugins:
android-extensions-compiler"
))
compile
(
ideaPluginDeps
(
"android-jps-plugin"
,
plugin
=
"android"
,
subdir
=
"lib/jps"
))
}
...
...
plugins/android-extensions/android-extensions-runtime/build.gradle.kts
浏览文件 @
1862c78b
/*
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
description
=
"Kotlin Android Extensions Runtime"
...
...
@@ -29,6 +13,8 @@ sourceSets {
"test"
{}
}
runtimeJar
()
runtimeJar
()
sourcesJar
()
javadocJar
()
publish
()
plugins/plugins-tests/build.gradle.kts
浏览文件 @
1862c78b
...
...
@@ -6,7 +6,7 @@ dependencies {
testCompile
(
project
(
":compiler:backend"
))
testCompile
(
project
(
":compiler:cli"
))
testCompile
(
project
(
":compiler.tests-common"
))
testCompile
(
project
(
":android-extensions-compiler"
))
testCompile
(
project
(
":
plugins:
android-extensions-compiler"
))
testCompile
(
project
(
":plugins:android-extensions-ide"
))
testCompile
(
project
(
":allopen-ide-plugin"
))
{
isTransitive
=
false
}
testCompile
(
project
(
":kotlin-allopen-compiler-plugin"
))
...
...
prepare/android-extensions-compiler-gradle/build.gradle.kts
0 → 100644
浏览文件 @
1862c78b
/*
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
org.jetbrains.kotlin.gradle.tasks.KotlinCompile
description
=
"Kotlin Android Extensions Compiler"
apply
{
plugin
(
"kotlin"
)
}
dependencies
{
compileOnly
(
ideaSdkCoreDeps
(
"intellij-core"
))
compileOnly
(
project
(
":compiler:util"
))
compileOnly
(
project
(
":compiler:plugin-api"
))
compileOnly
(
project
(
":compiler:frontend"
))
compileOnly
(
project
(
":compiler:frontend.java"
))
compileOnly
(
project
(
":compiler:backend"
))
compileOnly
(
project
(
":kotlin-android-extensions-runtime"
))
runtime
(
projectRuntimeJar
(
":kotlin-compiler-embeddable"
))
runtime
(
"com.google.android:android:2.3.1"
)
}
//val originalSrc = "$projectDir/src"
//val targetSrc = file("$buildDir/embeddable-target-src")
//
//if (System.getProperty("idea.active") == null) {
//
// val prepareEmbeddableSources by task<Copy> {
// from(originalSrc)
// into(targetSrc)
// filter { it.replace(Regex("(?<!\\.)com\\.intellij"), "org.jetbrains.kotlin.com.intellij") }
// }
//
// tasks.withType<KotlinCompile> { dependsOn(prepareEmbeddableSources) }
// tasks.withType<JavaCompile> { dependsOn(prepareEmbeddableSources) }
//}
sourceSets
{
"main"
{
// if (System.getProperty("idea.active") == null) {
// java.srcDir(targetSrc)
// resources.srcDir("src").apply { include("META-INF/**", "**/*.properties") }
// }
// else {
projectDefault
()
// }
}
"test"
{}
}
runtimeJar
{
from
(
getSourceSetsFrom
(
":kotlin-android-extensions-runtime"
)[
"main"
].
output
.
classesDirs
)
}
sourcesJar
()
javadocJar
()
publish
()
prepare/compiler/build.gradle.kts
浏览文件 @
1862c78b
...
...
@@ -38,23 +38,8 @@ val compilerBaseName = name
val
outputJar
=
File
(
buildDir
,
"libs"
,
"$compilerBaseName.jar"
)
val
compilerModules
:
Array
<
String
>
by
rootProject
.
extra
val
packagesToRelocate
=
listOf
(
"com.intellij"
,
"com.google"
,
"com.sampullara"
,
"org.apache"
,
"org.jdom"
,
"org.picocontainer"
,
"org.jline"
,
"gnu"
,
"javax.inject"
,
"org.fusesource"
,
"kotlinx.coroutines"
)
val
ideaCoreSdkJars
:
Array
<
String
>
by
rootProject
.
extra
val
coreSdkJarsSimple
=
ideaCoreSdkJars
.
filterNot
{
it
==
"jdom"
||
it
==
"log4j"
}.
toTypedArray
()
...
...
@@ -132,6 +117,8 @@ val proguard by task<ProGuardTask> {
printconfiguration
(
"$buildDir/compiler.pro.dump"
)
}
noDefaultJar
()
dist
(
targetName
=
compilerBaseName
+
".jar"
,
fromTask
=
if
(
shrink
)
proguard
else
packCompiler
)
...
...
prepare/kotlin-plugin/build.gradle.kts
浏览文件 @
1862c78b
...
...
@@ -77,7 +77,7 @@ val jar = runtimeJar(task<ShadowJar>("shadowJar")) {
from
(
packedJars
)
for
(
p
in
projectsToShadow
)
{
dependsOn
(
"$p:classes"
)
from
(
project
(
p
).
the
<
JavaPluginConvention
>().
sourceSets
.
getByName
(
"main"
)
.
output
)
from
(
getSourceSetsFrom
(
p
)[
"main"
]
.
output
)
}
}
...
...
settings.gradle
浏览文件 @
1862c78b
...
...
@@ -68,6 +68,7 @@ include ":kotlin-build-common",
":eval4j"
,
":j2k"
,
":plugins:lint"
,
":plugins:android-extensions-compiler"
,
":android-extensions-compiler"
,
":kotlin-android-extensions-runtime"
,
":plugins:android-extensions-ide"
,
...
...
@@ -167,7 +168,8 @@ project(':compiler:ir.psi2ir').projectDir = "$rootDir/compiler/ir/ir.psi2ir" as
project
(
':compiler:ir.ir2cfg'
).
projectDir
=
"$rootDir/compiler/ir/ir.ir2cfg"
as
File
project
(
':kotlin-jps-plugin'
).
projectDir
=
"$rootDir/prepare/jps-plugin"
as
File
project
(
':idea:idea-android-output-parser'
).
projectDir
=
"$rootDir/idea/idea-android/idea-android-output-parser"
as
File
project
(
':android-extensions-compiler'
).
projectDir
=
"$rootDir/plugins/android-extensions/android-extensions-compiler"
as
File
project
(
':plugins:android-extensions-compiler'
).
projectDir
=
"$rootDir/plugins/android-extensions/android-extensions-compiler"
as
File
project
(
':android-extensions-compiler'
).
projectDir
=
"$rootDir/prepare/android-extensions-compiler-gradle"
as
File
project
(
':kotlin-android-extensions-runtime'
).
projectDir
=
"$rootDir/plugins/android-extensions/android-extensions-runtime"
as
File
project
(
':plugins:android-extensions-ide'
).
projectDir
=
"$rootDir/plugins/android-extensions/android-extensions-idea"
as
File
project
(
':plugins:android-extensions-jps'
).
projectDir
=
"$rootDir/plugins/android-extensions/android-extensions-jps"
as
File
...
...
ultimate/build.gradle.kts
浏览文件 @
1862c78b
...
...
@@ -29,7 +29,7 @@ dependencies {
compile
(
project
(
":compiler:frontend"
))
{
isTransitive
=
false
}
compile
(
project
(
":compiler:frontend.java"
))
{
isTransitive
=
false
}
compile
(
project
(
":js:js.frontend"
))
{
isTransitive
=
false
}
compile
(
project
Classes
(
":idea"
))
compile
(
project
(
":idea"
))
compile
(
project
(
":idea:idea-core"
))
{
isTransitive
=
false
}
compile
(
project
(
":idea:ide-common"
))
{
isTransitive
=
false
}
compile
(
project
(
":idea:idea-gradle"
))
{
isTransitive
=
false
}
...
...
@@ -49,8 +49,8 @@ dependencies {
compile
(
ideaUltimatePluginDeps
(
"*.jar"
,
plugin
=
"gradle"
))
compile
(
ideaUltimatePluginDeps
(
"*.jar"
,
plugin
=
"Groovy"
))
compile
(
ideaUltimatePluginDeps
(
"*.jar"
,
plugin
=
"junit"
))
compile
(
ideaUltimatePluginDeps
(
"*.jar"
,
plugin
=
"JavaScriptLanguage"
))
compile
(
ideaUltimatePluginDeps
(
"*.jar"
,
plugin
=
"uml"
))
compile
(
ideaUltimatePluginDeps
(
"*.jar"
,
plugin
=
"JavaScriptLanguage"
))
testCompile
(
projectDist
(
":kotlin-test:kotlin-test-jvm"
))
testCompile
(
project
(
":compiler.tests-common"
))
{
isTransitive
=
false
}
...
...
@@ -66,7 +66,7 @@ dependencies {
testRuntime
(
projectDist
(
":kotlin-compiler"
))
testRuntime
(
project
(
":plugins:android-extensions-ide"
))
{
isTransitive
=
false
}
testRuntime
(
project
(
":android-extensions-compiler"
))
{
isTransitive
=
false
}
testRuntime
(
project
(
":
plugins:
android-extensions-compiler"
))
{
isTransitive
=
false
}
testRuntime
(
project
(
":plugins:annotation-based-compiler-plugins-ide-support"
))
{
isTransitive
=
false
}
testRuntime
(
project
(
":idea:idea-android"
))
{
isTransitive
=
false
}
testRuntime
(
project
(
":idea:idea-maven"
))
{
isTransitive
=
false
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录