Build reflection classes with gradle
This commit is contained in:
@@ -33,6 +33,7 @@ import java.util.List;
|
||||
|
||||
import static org.jetbrains.kotlin.resolve.descriptorUtil.DescriptorUtilsKt.getBuiltIns;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class PropertyDescriptorImpl extends VariableDescriptorWithInitializerImpl implements PropertyDescriptor {
|
||||
private final Modality modality;
|
||||
private Visibility visibility;
|
||||
|
||||
@@ -58,7 +58,8 @@ subprojects {
|
||||
configure(subprojects.findAll {it.name in [
|
||||
'kotlin-runtime', 'kotlin-script-runtime',
|
||||
'kotlin-stdlib', 'kotlin-stdlib-jre7', 'kotlin-stdlib-jre8',
|
||||
'kotlin-test-junit']}) {
|
||||
'kotlin-test-junit',
|
||||
'kotlin-reflect']}) {
|
||||
|
||||
apply plugin: 'kotlin'
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ include ':kotlin-stdlib-jre7'
|
||||
include ':kotlin-stdlib-jre8'
|
||||
include ':tools:binary-compatibility-validator'
|
||||
include ':tools:kotlin-stdlib-gen'
|
||||
//include ':kotlin-reflect'
|
||||
include ':kotlin-reflect'
|
||||
|
||||
//include ':kotlin-compiler'
|
||||
//include ':kotlin-compiler-embeddable'
|
||||
@@ -64,7 +64,7 @@ project(':kotlin-stdlib').projectDir = "$rootDir/stdlib" as File
|
||||
project(':kotlin-stdlib-js').projectDir = "$rootDir/stdlib/js" as File
|
||||
project(':kotlin-stdlib-jre7').projectDir = "$rootDir/stdlib/jre7" as File
|
||||
project(':kotlin-stdlib-jre8').projectDir = "$rootDir/stdlib/jre8" as File
|
||||
//project(':kotlin-reflect').projectDir = "$rootDir/tools/kotlin-reflect" as File
|
||||
project(':kotlin-reflect').projectDir = "$rootDir/tools/kotlin-reflect" as File
|
||||
|
||||
//project(':kotlin-compiler').projectDir = "$rootDir/tools/kotlin-compiler" as File
|
||||
//project(':kotlin-compiler-embeddable').projectDir = "$rootDir/tools/kotlin-compiler-embeddable" as File
|
||||
|
||||
@@ -27,6 +27,7 @@ sourceSets {
|
||||
|
||||
dependencies {
|
||||
builtinsCompile group: 'org.jetbrains', name: 'annotations', version:'13.0'
|
||||
compile group: 'org.jetbrains', name: 'annotations', version:'13.0'
|
||||
compile sourceSets.builtins.output
|
||||
|
||||
testCompile project(':kotlin-test:kotlin-test-junit')
|
||||
|
||||
@@ -1,9 +1,48 @@
|
||||
description = 'Kotlin Full Reflection Library'
|
||||
|
||||
description = 'Kotlin reflect'
|
||||
def core = "${rootDir}/../core"
|
||||
def depDir = "${rootDir}/../dependencies"
|
||||
|
||||
artifacts {
|
||||
archives file: file("${rootDir}/../dist/kotlinc/lib/kotlin-reflect.jar"), name: project.name, type: 'jar'
|
||||
archives file: file("${rootDir}/../dist/kotlin-reflect-sources-for-maven.jar"), name: project.name, classifier: 'sources', type: 'jar'
|
||||
sourceSets {
|
||||
annotations {
|
||||
java {
|
||||
srcDir "${core}/runtime.jvm/src"
|
||||
include "**/Mutable.java"
|
||||
include "**/ReadOnly.java"
|
||||
}
|
||||
}
|
||||
reflectMain {
|
||||
java {
|
||||
source annotations.java
|
||||
|
||||
srcDir "${core}/descriptor.loader.java/src"
|
||||
srcDir "${core}/descriptors/src"
|
||||
srcDir "${core}/descriptors.runtime/src"
|
||||
srcDir "${core}/deserialization/src"
|
||||
srcDir "${core}/util.runtime/src"
|
||||
|
||||
srcDir "${core}/reflection.jvm/src"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
reflectMainCompile project(':kotlin-stdlib')
|
||||
reflectMainCompile 'javax.inject:javax.inject:1'
|
||||
reflectMainCompile files("${depDir}/protobuf-2.6.1-lite.jar")
|
||||
}
|
||||
|
||||
|
||||
compileReflectMainJava {
|
||||
// options.compilerArgs.addAll(["-Xlint:unchecked"])
|
||||
}
|
||||
|
||||
compileReflectMainKotlin {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs = ["-version",
|
||||
"-Xallow-kotlin-package",
|
||||
"-Xdump-declarations-to", "${buildDir}/reflect-declarations.json"]
|
||||
}
|
||||
}
|
||||
|
||||
kotlin.experimental.coroutines "enable"
|
||||
Reference in New Issue
Block a user