New test for multiModulesHmpp project
^KT-48696
This commit is contained in:
committed by
Space
parent
35ff131608
commit
165b80cf02
+8
@@ -211,6 +211,14 @@ class HierarchicalMppIT : BaseGradleIT() {
|
||||
}
|
||||
}
|
||||
|
||||
// If we tested the build of the sample multimodules project we could catch KT-48370 at an earlier stage.
|
||||
@Test
|
||||
fun testMultiModulesHmpp() = with(Project("hierarchical-mpp-multi-modules", GradleVersionRequired.FOR_MPP_SUPPORT)) {
|
||||
build("assemble", options = defaultBuildOptions().copy(parallelTasksInProject = true)) {
|
||||
assertSuccessful()
|
||||
}
|
||||
}
|
||||
|
||||
private fun publishThirdPartyLib(
|
||||
projectName: String = "third-party-lib",
|
||||
directoryPrefix: String = "hierarchical-mpp-published-modules",
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'kotlin'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
|
||||
dependencies {
|
||||
testApi "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
|
||||
testApi "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
|
||||
testApi group: 'junit', name: 'junit', version: '4.12'
|
||||
api "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
|
||||
}
|
||||
|
||||
[compileKotlin, compileTestKotlin]*.configure {
|
||||
kotlinOptions {
|
||||
kotlinOptions.jvmTarget = "1.8"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
groupId 'org.jetbrains.qa.combompp'
|
||||
artifactId 'api-jvm'
|
||||
version publishing_version
|
||||
from components.java
|
||||
}
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package kt17916;
|
||||
|
||||
|
||||
@Deprecated()
|
||||
public class ImJDeprecated {
|
||||
@Deprecated
|
||||
public static String deprJavaField17916 = "fhjbsvs";
|
||||
|
||||
public static String sparam = "fsjg";
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package kt17916;
|
||||
|
||||
import static kt17916.ImJDeprecated.sparam;
|
||||
|
||||
public class JCaller {
|
||||
String scall = sparam;
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package pkg;
|
||||
|
||||
public @interface FooImpl {
|
||||
String value() default "abc"; // should be OK
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package transitiveStory.apiJvm.jbeginning;
|
||||
|
||||
import playground.SomeUsefulInfoKt;
|
||||
|
||||
public class JavaApiContainer {
|
||||
private String privateJavaDeclaration = "I'm a private string from `" + SomeUsefulInfoKt.getModuleName() +
|
||||
"` and shall be never visible to the others.";
|
||||
|
||||
String packageVisibleJavaDeclaration = "I'm a packag1e visible string from `" + SomeUsefulInfoKt.getModuleName() +
|
||||
"` and shall be never visible to the other modules.";
|
||||
|
||||
protected String protectedJavaDeclaration = "I'm a protected string from `" + SomeUsefulInfoKt.getModuleName() +
|
||||
"` and shall be never visible to the other modules except my subclasses.";
|
||||
|
||||
public String publicJavaDeclaration = "I'm a public string from `" + SomeUsefulInfoKt.getModuleName() +
|
||||
"` and shall be visible to the other modules.";
|
||||
|
||||
public static String publicStaticJavaDeclaration = "I'm a public static string from `" + SomeUsefulInfoKt.getModuleName() +
|
||||
"` and shall be visible to the other modules even without instantiation of `JavaApiContainer` class.";
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package verification.kt33972japi;
|
||||
|
||||
public class InheritTheJApi33972 {
|
||||
public void overrideMe(String s, int i, Double aDouble) {
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package verification.kt33972japi;
|
||||
|
||||
public interface InheritTheJInter33972 {
|
||||
public void overrideMeToo(String $self, String str2);
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package playground
|
||||
|
||||
val callMeFromMPP = 42
|
||||
|
||||
val moduleName = "api-jvm"
|
||||
|
||||
class SomeUsefulInfo
|
||||
|
||||
fun main() {
|
||||
println("Hello±!")
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package transitiveStory.apiJvm.beginning
|
||||
|
||||
import playground.moduleName
|
||||
|
||||
open class KotlinApiContainer {
|
||||
private val privateKotlinDeclaration = "I'm a private Kotlin string from `" + moduleName +
|
||||
"` and shall be never visible to the others."
|
||||
|
||||
internal val packageVisibleKotlinDeclaration = "I'm a package visible Kotlin string from `" + moduleName +
|
||||
"` and shall be never visible to the other modules."
|
||||
|
||||
protected open val protectedKotlinDeclaration = "I'm a protected Kotlin string from `" + moduleName +
|
||||
"` and shall be never visible to the other modules except my subclasses."
|
||||
|
||||
val publicKotlinDeclaration = "I'm a public Kotlin string from `" + moduleName +
|
||||
"` and shall be visible to the other modules."
|
||||
|
||||
companion object {
|
||||
val publicStaticKotlinDeclaration = "I'm a public Kotlin static string from `" + moduleName +
|
||||
"` and shall be visible to the other modules even without instantiation of `JavaApiContainer` class."
|
||||
}
|
||||
}
|
||||
|
||||
val tlAPIval = 42
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
package transitiveStory.apiJvm.jtest.smokeTest;
|
||||
|
||||
public class JClassForTheSmokeTestFromApi {
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package verification.kt17916jt;
|
||||
|
||||
import org.junit.internal.AssumptionViolatedException;
|
||||
import org.junit.rules.TestWatcher;
|
||||
import org.junit.runner.Description;
|
||||
|
||||
public class CallerT extends TestWatcher {
|
||||
void twatcherCall(TestWatcher testWatcher) {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void skipped(AssumptionViolatedException e, Description description) {
|
||||
super.skipped(e, description);
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package transitiveStory.apiJvm.test.smokeTest
|
||||
|
||||
import org.junit.Test
|
||||
import transitiveStory.apiJvm.beginning.tlAPIval
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
class KClassForTheSmokeTestFromApi {
|
||||
}
|
||||
|
||||
class SomeTestInApiJVM {
|
||||
@Test
|
||||
fun some() {
|
||||
println("I'm simple test in `api-jvm` module")
|
||||
assertEquals(tlAPIval, 42)
|
||||
}
|
||||
|
||||
// KT-33573
|
||||
@Test
|
||||
fun `function with spaces`() {}
|
||||
}
|
||||
+119
@@ -0,0 +1,119 @@
|
||||
group 'org.jetbrains.qa.combompp'
|
||||
version '1.0'
|
||||
|
||||
apply plugin: 'kotlin-multiplatform'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
def complexLibAttribute = Attribute.of('org.jetbrains.qa.complexlib', String)
|
||||
|
||||
kotlin {
|
||||
jvm("jvmWithJava") {
|
||||
withJava()
|
||||
attributes { attribute(complexLibAttribute, 'jvmWithJava') }
|
||||
|
||||
compilations.all {
|
||||
kotlinOptions.jvmTarget = "1.8"
|
||||
}
|
||||
}
|
||||
jvm("jvm16") {
|
||||
attributes { attribute(complexLibAttribute, 'jvm16') }
|
||||
|
||||
compilations.all {
|
||||
kotlinOptions.jvmTarget = "1.6"
|
||||
}
|
||||
}
|
||||
// This is for iPhone emulator
|
||||
// Switch here to iosArm64 (or iosArm32) to build library for iPhone device
|
||||
iosX64("iosSimLib") {
|
||||
binaries {
|
||||
// framework()
|
||||
// Creating static library with a custom name.
|
||||
staticLib('customNameForiosSimLib') {
|
||||
outputDirectory = file("fooCustomNameForiosSimLib") // outputDir is a `val` property.
|
||||
linkTask.destinationDir = file("fooCustomNameForiosSimLib")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// inline classes are enabled below
|
||||
targets.all {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs += ["-Xprogressive", "-XXLanguage:+NewInference", "-XXLanguage:+SamConversionForKotlinFunctions", "-Xuse-experimental=kotlin.ExperimentalMultiplatform", "-Xskip-prerelease-check"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
commonMain {
|
||||
dependencies { }
|
||||
}
|
||||
commonTest {
|
||||
dependencies { }
|
||||
}
|
||||
|
||||
// creating a diamond
|
||||
jvmJavaJvm16Main {
|
||||
dependsOn commonMain
|
||||
dependencies {
|
||||
api project(":api-jvm")
|
||||
}
|
||||
}
|
||||
|
||||
jvmJavaJvm16Test {
|
||||
dependsOn commonTest
|
||||
}
|
||||
|
||||
jvmWithJavaiOSMain {
|
||||
dependsOn commonMain
|
||||
dependencies {
|
||||
api project(":top-mpp")
|
||||
}
|
||||
}
|
||||
|
||||
jvmWithJavaiOSTest {
|
||||
dependsOn commonTest
|
||||
}
|
||||
|
||||
// setting up the targets source sets
|
||||
jvm16Main {
|
||||
dependencies { }
|
||||
|
||||
// connecting to the diamond
|
||||
dependsOn jvmJavaJvm16Main
|
||||
}
|
||||
jvm16Test {
|
||||
dependencies { }
|
||||
|
||||
// connecting to the diamond
|
||||
dependsOn jvmJavaJvm16Test
|
||||
}
|
||||
jvmWithJavaMain {
|
||||
dependencies { }
|
||||
|
||||
// connecting to the diamond
|
||||
dependsOn jvmJavaJvm16Main
|
||||
dependsOn jvmWithJavaiOSMain
|
||||
}
|
||||
jvmWithJavaTest {
|
||||
dependencies { }
|
||||
|
||||
// connecting to the diamond
|
||||
dependsOn jvmJavaJvm16Test
|
||||
dependsOn jvmWithJavaiOSTest
|
||||
}
|
||||
|
||||
iosSimLibMain {
|
||||
dependencies { }
|
||||
|
||||
// connecting to the diamond
|
||||
dependsOn jvmWithJavaiOSMain
|
||||
}
|
||||
iosSimLibTest {
|
||||
dependencies { }
|
||||
|
||||
// connecting to the diamond
|
||||
dependsOn jvmWithJavaiOSTest
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
Binary file not shown.
+139
@@ -0,0 +1,139 @@
|
||||
#ifndef KONAN_LIBCUSTOMNAMEFORIOSSIMLIB_H
|
||||
#define KONAN_LIBCUSTOMNAMEFORIOSSIMLIB_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
typedef bool libcustomNameForiosSimLib_KBoolean;
|
||||
#else
|
||||
typedef _Bool libcustomNameForiosSimLib_KBoolean;
|
||||
#endif
|
||||
typedef unsigned short libcustomNameForiosSimLib_KChar;
|
||||
typedef signed char libcustomNameForiosSimLib_KByte;
|
||||
typedef short libcustomNameForiosSimLib_KShort;
|
||||
typedef int libcustomNameForiosSimLib_KInt;
|
||||
typedef long long libcustomNameForiosSimLib_KLong;
|
||||
typedef unsigned char libcustomNameForiosSimLib_KUByte;
|
||||
typedef unsigned short libcustomNameForiosSimLib_KUShort;
|
||||
typedef unsigned int libcustomNameForiosSimLib_KUInt;
|
||||
typedef unsigned long long libcustomNameForiosSimLib_KULong;
|
||||
typedef float libcustomNameForiosSimLib_KFloat;
|
||||
typedef double libcustomNameForiosSimLib_KDouble;
|
||||
typedef float __attribute__ ((__vector_size__ (16))) libcustomNameForiosSimLib_KVector128;
|
||||
typedef void* libcustomNameForiosSimLib_KNativePtr;
|
||||
struct libcustomNameForiosSimLib_KType;
|
||||
typedef struct libcustomNameForiosSimLib_KType libcustomNameForiosSimLib_KType;
|
||||
|
||||
typedef struct {
|
||||
libcustomNameForiosSimLib_KNativePtr pinned;
|
||||
} libcustomNameForiosSimLib_kref_kotlin_Byte;
|
||||
typedef struct {
|
||||
libcustomNameForiosSimLib_KNativePtr pinned;
|
||||
} libcustomNameForiosSimLib_kref_kotlin_Short;
|
||||
typedef struct {
|
||||
libcustomNameForiosSimLib_KNativePtr pinned;
|
||||
} libcustomNameForiosSimLib_kref_kotlin_Int;
|
||||
typedef struct {
|
||||
libcustomNameForiosSimLib_KNativePtr pinned;
|
||||
} libcustomNameForiosSimLib_kref_kotlin_Long;
|
||||
typedef struct {
|
||||
libcustomNameForiosSimLib_KNativePtr pinned;
|
||||
} libcustomNameForiosSimLib_kref_kotlin_Float;
|
||||
typedef struct {
|
||||
libcustomNameForiosSimLib_KNativePtr pinned;
|
||||
} libcustomNameForiosSimLib_kref_kotlin_Double;
|
||||
typedef struct {
|
||||
libcustomNameForiosSimLib_KNativePtr pinned;
|
||||
} libcustomNameForiosSimLib_kref_kotlin_Char;
|
||||
typedef struct {
|
||||
libcustomNameForiosSimLib_KNativePtr pinned;
|
||||
} libcustomNameForiosSimLib_kref_kotlin_Boolean;
|
||||
typedef struct {
|
||||
libcustomNameForiosSimLib_KNativePtr pinned;
|
||||
} libcustomNameForiosSimLib_kref_kotlin_Unit;
|
||||
typedef struct {
|
||||
libcustomNameForiosSimLib_KNativePtr pinned;
|
||||
} libcustomNameForiosSimLib_kref_transitiveStory_midActual_commonSource_SomeMPPInTheCommon;
|
||||
typedef struct {
|
||||
libcustomNameForiosSimLib_KNativePtr pinned;
|
||||
} libcustomNameForiosSimLib_kref_transitiveStory_midActual_commonSource_SomeMPPInTheCommon_Compainon;
|
||||
typedef struct {
|
||||
libcustomNameForiosSimLib_KNativePtr pinned;
|
||||
} libcustomNameForiosSimLib_kref_transitiveStory_midActual_sourceCalls_intemediateCall_BottomActualCommonInheritor;
|
||||
typedef struct {
|
||||
libcustomNameForiosSimLib_KNativePtr pinned;
|
||||
} libcustomNameForiosSimLib_kref_transitiveStory_midActual_sourceCalls_intemediateCall_BottomActualMPPInheritor;
|
||||
typedef struct {
|
||||
libcustomNameForiosSimLib_KNativePtr pinned;
|
||||
} libcustomNameForiosSimLib_kref_transitiveStory_midActual_sourceCalls_intemediateCall_SecondModCaller;
|
||||
typedef struct {
|
||||
libcustomNameForiosSimLib_KNativePtr pinned;
|
||||
} libcustomNameForiosSimLib_kref_transitiveStory_bottomActual_intermediateSrc_IntermediateMPPClassInBottomActual;
|
||||
|
||||
|
||||
typedef struct {
|
||||
/* Service functions. */
|
||||
void (*DisposeStablePointer)(libcustomNameForiosSimLib_KNativePtr ptr);
|
||||
void (*DisposeString)(const char* string);
|
||||
libcustomNameForiosSimLib_KBoolean (*IsInstance)(libcustomNameForiosSimLib_KNativePtr ref, const libcustomNameForiosSimLib_KType* type);
|
||||
libcustomNameForiosSimLib_kref_kotlin_Byte (*createNullableByte)(libcustomNameForiosSimLib_KByte);
|
||||
libcustomNameForiosSimLib_kref_kotlin_Short (*createNullableShort)(libcustomNameForiosSimLib_KShort);
|
||||
libcustomNameForiosSimLib_kref_kotlin_Int (*createNullableInt)(libcustomNameForiosSimLib_KInt);
|
||||
libcustomNameForiosSimLib_kref_kotlin_Long (*createNullableLong)(libcustomNameForiosSimLib_KLong);
|
||||
libcustomNameForiosSimLib_kref_kotlin_Float (*createNullableFloat)(libcustomNameForiosSimLib_KFloat);
|
||||
libcustomNameForiosSimLib_kref_kotlin_Double (*createNullableDouble)(libcustomNameForiosSimLib_KDouble);
|
||||
libcustomNameForiosSimLib_kref_kotlin_Char (*createNullableChar)(libcustomNameForiosSimLib_KChar);
|
||||
libcustomNameForiosSimLib_kref_kotlin_Boolean (*createNullableBoolean)(libcustomNameForiosSimLib_KBoolean);
|
||||
libcustomNameForiosSimLib_kref_kotlin_Unit (*createNullableUnit)(void);
|
||||
|
||||
/* User functions. */
|
||||
struct {
|
||||
struct {
|
||||
struct {
|
||||
struct {
|
||||
struct {
|
||||
const char* (*get_moduleName)();
|
||||
const char* (*get_sourceSetName)();
|
||||
const char* (*regularTLfunInTheMidActualCommmon)(const char* s);
|
||||
struct {
|
||||
libcustomNameForiosSimLib_KType* (*_type)(void);
|
||||
libcustomNameForiosSimLib_kref_transitiveStory_midActual_commonSource_SomeMPPInTheCommon (*SomeMPPInTheCommon)();
|
||||
libcustomNameForiosSimLib_KInt (*get_simpleVal)(libcustomNameForiosSimLib_kref_transitiveStory_midActual_commonSource_SomeMPPInTheCommon thiz);
|
||||
struct {
|
||||
libcustomNameForiosSimLib_KType* (*_type)(void);
|
||||
libcustomNameForiosSimLib_kref_transitiveStory_midActual_commonSource_SomeMPPInTheCommon_Compainon (*_instance)();
|
||||
const char* (*get_inTheCompanionOfBottomActualDeclarations)(libcustomNameForiosSimLib_kref_transitiveStory_midActual_commonSource_SomeMPPInTheCommon_Compainon thiz);
|
||||
} Compainon;
|
||||
} SomeMPPInTheCommon;
|
||||
} commonSource;
|
||||
struct {
|
||||
struct {
|
||||
struct {
|
||||
libcustomNameForiosSimLib_KType* (*_type)(void);
|
||||
libcustomNameForiosSimLib_kref_transitiveStory_midActual_sourceCalls_intemediateCall_BottomActualCommonInheritor (*BottomActualCommonInheritor)();
|
||||
} BottomActualCommonInheritor;
|
||||
struct {
|
||||
libcustomNameForiosSimLib_KType* (*_type)(void);
|
||||
libcustomNameForiosSimLib_kref_transitiveStory_midActual_sourceCalls_intemediateCall_BottomActualMPPInheritor (*BottomActualMPPInheritor)();
|
||||
} BottomActualMPPInheritor;
|
||||
struct {
|
||||
libcustomNameForiosSimLib_KType* (*_type)(void);
|
||||
libcustomNameForiosSimLib_kref_transitiveStory_midActual_sourceCalls_intemediateCall_SecondModCaller (*SecondModCaller)();
|
||||
libcustomNameForiosSimLib_kref_transitiveStory_bottomActual_intermediateSrc_IntermediateMPPClassInBottomActual (*get_interCallFive)(libcustomNameForiosSimLib_kref_transitiveStory_midActual_sourceCalls_intemediateCall_SecondModCaller thiz);
|
||||
libcustomNameForiosSimLib_KInt (*get_interCallFour)(libcustomNameForiosSimLib_kref_transitiveStory_midActual_sourceCalls_intemediateCall_SecondModCaller thiz);
|
||||
const char* (*get_interCallOne)(libcustomNameForiosSimLib_kref_transitiveStory_midActual_sourceCalls_intemediateCall_SecondModCaller thiz);
|
||||
libcustomNameForiosSimLib_KInt (*get_interCallThree)(libcustomNameForiosSimLib_kref_transitiveStory_midActual_sourceCalls_intemediateCall_SecondModCaller thiz);
|
||||
const char* (*get_interCallTwo)(libcustomNameForiosSimLib_kref_transitiveStory_midActual_sourceCalls_intemediateCall_SecondModCaller thiz);
|
||||
} SecondModCaller;
|
||||
} intemediateCall;
|
||||
} sourceCalls;
|
||||
} midActual;
|
||||
} transitiveStory;
|
||||
} root;
|
||||
} kotlin;
|
||||
} libcustomNameForiosSimLib_ExportedSymbols;
|
||||
extern libcustomNameForiosSimLib_ExportedSymbols* libcustomNameForiosSimLib_symbols(void);
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
#endif /* KONAN_LIBCUSTOMNAMEFORIOSSIMLIB_H */
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package transitiveStory.midActual.commonSource
|
||||
|
||||
val moduleName = "bottom-mpp"
|
||||
expect val sourceSetName: String
|
||||
|
||||
expect open class SomeMPPInTheCommon() {
|
||||
val simpleVal: Int
|
||||
|
||||
companion object Compainon {
|
||||
val inTheCompanionOfBottomActualDeclarations: String
|
||||
}
|
||||
}
|
||||
|
||||
fun regularTLfunInTheMidActualCommmon(s: String): String {
|
||||
return "I'm a function at the top level of a file in `commonMain` source set of module $moduleName." +
|
||||
"This is the message I've got: \n`$s`"
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package transitiveStory.midActual.commonSource
|
||||
|
||||
actual open class SomeMPPInTheCommon actual constructor() {
|
||||
actual val simpleVal: Int = 85
|
||||
|
||||
actual companion object Compainon {
|
||||
actual val inTheCompanionOfBottomActualDeclarations: String = "I'm the string in `$sourceSetName` source set"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
actual val sourceSetName: String = "iosSimLibMain"
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package transitiveStory.midActual.sourceCalls.intemediateCall
|
||||
|
||||
import transitiveStory.bottomActual.mppBeginning.BottomActualDeclarations
|
||||
|
||||
actual class BottomActualMPPInheritor : BottomActualDeclarations()
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package transitiveStory.midActual
|
||||
|
||||
/*import playground.first.callMe307563354
|
||||
import playground.first.fsdkjgnfs*/
|
||||
import transitiveStory.bottomActual.mppBeginning.BottomActualDeclarations
|
||||
import kotlin.test.Test
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
val callInCTests = BottomActualDeclarations()
|
||||
|
||||
class CallInCTests {
|
||||
@Test
|
||||
fun someTestCallingTransitiveDeps() {
|
||||
// val call = callMe307563354
|
||||
// println(call)
|
||||
assertEquals(true, true)
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package transitiveStory.midActual.commonSource
|
||||
|
||||
|
||||
actual open class SomeMPPInTheCommon actual constructor() {
|
||||
actual val simpleVal: Int = 16
|
||||
|
||||
actual companion object Compainon {
|
||||
actual val inTheCompanionOfBottomActualDeclarations: String = "I'm the string in `$sourceSetName` source set"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
actual val sourceSetName: String = "jvm16Main"
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package transitiveStory.jvmMidActual
|
||||
|
||||
import transitiveStory.apiJvm.jbeginning.JavaApiContainer
|
||||
|
||||
object CallingSomeApis {
|
||||
val first = JavaApiContainer()
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
package transitiveStory.midActual.allTheCallsMirror;
|
||||
|
||||
import transitiveStory.apiJvm.beginning.KotlinApiContainer;
|
||||
import transitiveStory.apiJvm.jbeginning.JavaApiContainer;
|
||||
import transitiveStory.bottomActual.apiCall.Jvm18KApiInheritor;
|
||||
import transitiveStory.bottomActual.intermediateSrc.IntermediateMPPClassInBottomActual;
|
||||
import transitiveStory.bottomActual.jApiCall.JApiCallerInJVM18;
|
||||
import transitiveStory.bottomActual.mppBeginning.BottomActualDeclarations;
|
||||
|
||||
import static transitiveStory.bottomActual.mppBeginning.BottomActualDeclarationsKt.regularTLfunInTheBottomActualCommmon;
|
||||
|
||||
public class TheSameCallsButJava {
|
||||
// ========= api calls ==========
|
||||
// java
|
||||
JavaApiContainer jApiOne = new JavaApiContainer();
|
||||
|
||||
// kotlin
|
||||
KotlinApiContainer kApiOne = new KotlinApiContainer();
|
||||
|
||||
// ========= mpp-bottom-actual calls ==========
|
||||
// common source set
|
||||
String interCallOne = regularTLfunInTheBottomActualCommmon("Some string from `mpp-mid-actual` module");
|
||||
// String interCallTwo = inTheCompanionOfBottomActualDeclarations;
|
||||
String some = regularTLfunInTheBottomActualCommmon("");
|
||||
|
||||
// intermediate source set
|
||||
// https://youtrack.jetbrains.com/issue/KT-33733
|
||||
BottomActualDeclarations interCallThree = new BottomActualDeclarations();
|
||||
|
||||
// ========= jvm18 source set (attempt to) ==========
|
||||
// java
|
||||
JApiCallerInJVM18 jApiCallerInJVM18 = new JApiCallerInJVM18();
|
||||
|
||||
// kotlin
|
||||
Jvm18KApiInheritor jvm18KApiInheritor = new Jvm18KApiInheritor();
|
||||
IntermediateMPPClassInBottomActual intermediateMPPClassInBottomActual = new IntermediateMPPClassInBottomActual();
|
||||
}
|
||||
|
||||
/*
|
||||
// experiments with intermod inheritance
|
||||
class BottomActualCommonInheritorInJVM : BottomActualDeclarations()
|
||||
*/
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package transitiveStory.midActual.commonSource
|
||||
|
||||
actual open class SomeMPPInTheCommon actual constructor() {
|
||||
actual val simpleVal: Int = 18
|
||||
|
||||
actual companion object Compainon {
|
||||
actual val inTheCompanionOfBottomActualDeclarations: String = "I'm the string in `$sourceSetName` source set"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
actual val sourceSetName: String = "jvmWithJava"
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package transitiveStory.midActual.sourceCalls.allTheCalls
|
||||
|
||||
|
||||
import transitiveStory.apiJvm.beginning.KotlinApiContainer
|
||||
import transitiveStory.apiJvm.jbeginning.JavaApiContainer
|
||||
import transitiveStory.bottomActual.apiCall.Jvm18JApiInheritor
|
||||
import transitiveStory.bottomActual.apiCall.Jvm18KApiInheritor
|
||||
import transitiveStory.bottomActual.mppBeginning.BottomActualDeclarations
|
||||
import transitiveStory.bottomActual.mppBeginning.regularTLfunInTheBottomActualCommmon
|
||||
import transitiveStory.bottomActual.intermediateSrc.*
|
||||
import transitiveStory.bottomActual.jApiCall.JApiCallerInJVM18
|
||||
|
||||
class INeedAllTheSourceSets {
|
||||
// ========= api calls ==========
|
||||
// java
|
||||
val jApiOne = JavaApiContainer()
|
||||
|
||||
// kotlin
|
||||
val kApiOne = KotlinApiContainer()
|
||||
|
||||
// ========= mpp-bottom-actual calls ==========
|
||||
// common source set
|
||||
val interCallOne = regularTLfunInTheBottomActualCommmon("Some string from `mpp-mid-actual` module")
|
||||
val interCallTwo = BottomActualDeclarations.inTheCompanionOfBottomActualDeclarations
|
||||
val interCallThree = BottomActualDeclarations().simpleVal
|
||||
|
||||
// intermediate source set
|
||||
val interCallFour = InBottomActualIntermediate().p
|
||||
val interCallFive = IntermediateMPPClassInBottomActual()
|
||||
|
||||
// ========= jvm18 source set (attempt to) ==========
|
||||
// java
|
||||
val interCallSix = JApiCallerInJVM18()
|
||||
|
||||
// kotlin
|
||||
val interCallSeven = Jvm18KApiInheritor()
|
||||
val interCallEight = Jvm18JApiInheritor()
|
||||
val interCallNine = IntermediateMPPClassInBottomActual()
|
||||
}
|
||||
|
||||
|
||||
// experiments with intermod inheritance
|
||||
class BottomActualCommonInheritorInJVM : BottomActualDeclarations()
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package transitiveStory.midActual.sourceCalls.intemediateCall
|
||||
|
||||
import transitiveStory.bottomActual.mppBeginning.BottomActualDeclarations
|
||||
|
||||
actual class BottomActualMPPInheritor : BottomActualDeclarations()
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package transitiveStory.midActual.sourceCalls.intemediateInheritorCall
|
||||
|
||||
import transitiveStory.midActual.sourceCalls.intemediateCall.BottomActualCommonInheritor
|
||||
import transitiveStory.midActual.sourceCalls.intemediateCall.BottomActualMPPInheritor
|
||||
|
||||
val t123 = BottomActualCommonInheritor()
|
||||
val t122 = BottomActualMPPInheritor()
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package transitiveStory.midActual.platform.jtest.smokeTest;
|
||||
|
||||
import transitiveStory.apiJvm.beginning.KotlinApiContainer;
|
||||
import transitiveStory.apiJvm.jbeginning.JavaApiContainer;
|
||||
import transitiveStory.bottomActual.intermediateSrc.InBottomActualIntermediate;
|
||||
import transitiveStory.bottomActual.intermediateSrc.IntermediateMPPClassInBottomActual;
|
||||
|
||||
public class MidActualPlatformJTest {
|
||||
// ================ api =================
|
||||
// java
|
||||
// JClassForTheSmokeTestFromApi jClassForTheSmokeTestFromApi = new JClassForTheSmokeTestFromApi();
|
||||
JavaApiContainer javaApiContainer = new JavaApiContainer();
|
||||
|
||||
// kotlin
|
||||
// ForTheSmokeTestFromApi forTheSmokeTestFromApi = new ForTheSmokeTestFromApi();
|
||||
KotlinApiContainer kotlinApiContainer = new KotlinApiContainer();
|
||||
|
||||
// ================ intermediate src of this module =================
|
||||
InBottomActualIntermediate inBottomActualIntermediate = new InBottomActualIntermediate();
|
||||
|
||||
// ================ jvm18Main =================
|
||||
IntermediateMPPClassInBottomActual intermediateMPPClassInBottomActual = new IntermediateMPPClassInBottomActual();
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package transitiveStory.midActual.sourceCalls.intemediateCall
|
||||
|
||||
import transitiveStory.bottomActual.mppBeginning.BottomActualDeclarations
|
||||
import transitiveStory.bottomActual.mppBeginning.regularTLfunInTheBottomActualCommmon
|
||||
|
||||
// https://youtrack.jetbrains.com/issue/KT-33731
|
||||
import transitiveStory.bottomActual.intermediateSrc.*
|
||||
|
||||
class SecondModCaller {
|
||||
// ========= mpp-bottom-actual calls ==========
|
||||
// common source set
|
||||
val interCallOne = regularTLfunInTheBottomActualCommmon("Some string from `mpp-mid-actual` module")
|
||||
val interCallTwo = BottomActualDeclarations.inTheCompanionOfBottomActualDeclarations
|
||||
val interCallThree = BottomActualDeclarations().simpleVal
|
||||
|
||||
// https://youtrack.jetbrains.com/issue/KT-33731
|
||||
// intermediate source set
|
||||
val interCallFour = InBottomActualIntermediate().p
|
||||
val interCallFive = IntermediateMPPClassInBottomActual()
|
||||
|
||||
// kotlin
|
||||
val interCallNine = IntermediateMPPClassInBottomActual()
|
||||
}
|
||||
|
||||
|
||||
// experiments with intermod inheritance
|
||||
class BottomActualCommonInheritor : BottomActualDeclarations()
|
||||
expect class BottomActualMPPInheritor : BottomActualDeclarations
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package transitiveStory.midActual.common.test.smokeTest
|
||||
|
||||
// https://youtrack.jetbrains.com/issue/KT-33731
|
||||
import transitiveStory.bottomActual.intermediateSrc.InBottomActualIntermediate
|
||||
// import transitiveStory.bottomActual.intermediateSrc.IntermediateMPPClassInBottomActual
|
||||
|
||||
class TCallerFromCommMidActual {
|
||||
// ================ intermediate src of mpp-bottom-actual module =================
|
||||
internal var inBottomActualIntermediate =
|
||||
InBottomActualIntermediate()
|
||||
|
||||
/* // ================ jvm18Main =================
|
||||
internal var intermediateMPPClassInBottomActual =
|
||||
IntermediateMPPClassInBottomActual()*/
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
publishing_version = 1.0-5.3-1.6.255-SNAPSHOT
|
||||
|
||||
kotlin.mpp.enableGranularSourceSetsMetadata=true
|
||||
kotlin.native.enableDependencyPropagation=false
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
group 'org.jetbrains.qa.combompp'
|
||||
version publishing_version
|
||||
|
||||
apply plugin: 'kotlin-multiplatform'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
kotlin {
|
||||
js() {
|
||||
browser()
|
||||
nodejs()
|
||||
}
|
||||
linuxX64("linux")
|
||||
macosX64("macos")
|
||||
ios()
|
||||
jvm()
|
||||
|
||||
sourceSets {
|
||||
commonMain {
|
||||
dependencies { }
|
||||
}
|
||||
commonTest {
|
||||
dependencies { }
|
||||
}
|
||||
|
||||
// creating a diamond
|
||||
jsLinuxMain {
|
||||
dependsOn commonMain
|
||||
dependencies {
|
||||
api project(":top-mpp")
|
||||
}
|
||||
}
|
||||
|
||||
jvmMacosMain {
|
||||
dependsOn commonMain
|
||||
}
|
||||
|
||||
macosLinuxMain {
|
||||
dependsOn commonMain
|
||||
}
|
||||
|
||||
iosMacosMain {
|
||||
dependsOn commonMain
|
||||
}
|
||||
|
||||
iosX64Main {
|
||||
dependsOn iosMacosMain
|
||||
}
|
||||
jsMain {
|
||||
dependsOn jsLinuxMain
|
||||
dependencies { }
|
||||
}
|
||||
jsTest {
|
||||
dependencies { }
|
||||
}
|
||||
jvmMain {
|
||||
dependsOn jvmMacosMain
|
||||
dependencies { }
|
||||
}
|
||||
jvmTest {
|
||||
dependencies { }
|
||||
}
|
||||
linuxMain {
|
||||
dependsOn jsLinuxMain
|
||||
dependsOn macosLinuxMain
|
||||
dependencies {}
|
||||
}
|
||||
linuxTest {
|
||||
dependencies { }
|
||||
}
|
||||
macosMain {
|
||||
dependsOn jvmMacosMain
|
||||
dependsOn macosLinuxMain
|
||||
dependsOn iosMacosMain
|
||||
|
||||
}
|
||||
macosTest {
|
||||
dependencies { }
|
||||
}
|
||||
}
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
// !CHECK_HIGHLIGHTING
|
||||
package callingCommonized
|
||||
|
||||
import kotlinx.cinterop.NativePtr
|
||||
import platform.Accelerate.*
|
||||
import platform.CoreFoundation.CFAllocatorGetTypeID
|
||||
import platform.CoreFoundation.CFTypeID
|
||||
import platform.CoreFoundation.__CFByteOrder
|
||||
import platform.darwin.NSObject
|
||||
|
||||
class TheCallerIniOSMacos(p: NativePtr) {
|
||||
val eVal: CBLAS_TRANSPOSE = AtlasConj
|
||||
|
||||
val eval2 = BNNSActivationFunctionAbs
|
||||
|
||||
fun someWrapper() {
|
||||
CFAllocatorGetTypeID()
|
||||
}
|
||||
|
||||
val enumCall: kotlinx.cinterop.CEnum = __CFByteOrder.CFByteOrderLittleEndian
|
||||
}
|
||||
|
||||
expect class WCommonizedCalls(pc: __CLPK_real) {
|
||||
|
||||
val eClass: NSObject // = ACAccount
|
||||
val enumInteroped: kotlinx.cinterop.CEnum
|
||||
}
|
||||
|
||||
class CallMyFields {
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// !CHECK_HIGHLIGHTING
|
||||
package verification.commonizer
|
||||
|
||||
import platform.Foundation.NSArgumentDomain
|
||||
import kotlin.test.Test
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
class SomethingInTest {
|
||||
@Test
|
||||
fun someTestInSharediOS() {
|
||||
val callingComm = NSArgumentDomain
|
||||
println(callingComm)
|
||||
assertEquals(42, 42)
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
// !CHECK_HIGHLIGHTING
|
||||
package callingCommonized
|
||||
|
||||
import kotlinx.cinterop.CEnum
|
||||
import platform.Accelerate.AtlasConj
|
||||
import platform.Accelerate.CBLAS_TRANSPOSE
|
||||
import platform.Accelerate.FFTDirection
|
||||
import platform.Accelerate.__CLPK_real
|
||||
import platform.Accounts.ACAccount
|
||||
import platform.CoreFoundation.CFAllocatorGetTypeID
|
||||
import platform.CoreFoundation.CFTypeID
|
||||
import platform.CoreFoundation.__CFByteOrder
|
||||
import platform.Foundation.NSLog
|
||||
import platform.darwin.ABDAY_1
|
||||
import platform.darwin.NSObject
|
||||
import platform.darwin.PLATFORM_IOS
|
||||
import platform.posix.DBL_MIN
|
||||
|
||||
actual class WCommonizedCalls actual constructor(pc: __CLPK_real) {
|
||||
|
||||
val eFunCall: CFTypeID = CFAllocatorGetTypeID() // create actual doesn't work because of this
|
||||
actual val eClass: NSObject = ACAccount()
|
||||
actual val enumInteroped: CEnum = __CFByteOrder.CFByteOrderLittleEndian
|
||||
|
||||
val somel = NSLog("")
|
||||
|
||||
val dfg = DBL_MIN
|
||||
|
||||
val device get() = platform.UIKit.UIDevice.currentDevice
|
||||
|
||||
val eVal: CBLAS_TRANSPOSE = AtlasConj
|
||||
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package commonizerVerification
|
||||
|
||||
import kotlin.jvm.JvmField
|
||||
|
||||
class Another {
|
||||
|
||||
@JvmField
|
||||
val dsf = 324
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// !CHECK_HIGHLIGHTING
|
||||
package callingCommonized
|
||||
|
||||
import platform.posix.ns_r_notauth
|
||||
|
||||
class Calls145t431 {
|
||||
val theCall = ns_r_notauth
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
// !CHECK_HIGHLIGHTING
|
||||
package callingCommonized
|
||||
|
||||
import kotlinx.cinterop.CEnum
|
||||
import platform.Accelerate.AtlasConj
|
||||
import platform.Accelerate.CBLAS_TRANSPOSE
|
||||
import platform.Accelerate.__CLPK_real
|
||||
import platform.CoreFoundation.CFAllocatorGetTypeID
|
||||
import platform.CoreFoundation.CFTypeID
|
||||
import platform.darwin.NSObject
|
||||
import platform.posix.ns_r_notauth
|
||||
|
||||
actual class WCommonizedCalls actual constructor(pc: __CLPK_real) {
|
||||
|
||||
val eFunCall: CFTypeID = CFAllocatorGetTypeID()
|
||||
actual val eClass: NSObject
|
||||
get() = TODO("Not yet implemented")
|
||||
actual val enumInteroped: CEnum
|
||||
get() = TODO("Not yet implemented")
|
||||
|
||||
val eVal: CBLAS_TRANSPOSE = AtlasConj
|
||||
|
||||
val theCall = ns_r_notauth
|
||||
|
||||
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
group 'org.jetbrains.qa.combompp'
|
||||
version publishing_version
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'kotlin'
|
||||
//apply plugin: "application"
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
|
||||
|
||||
dependencies {
|
||||
api project(":bottom-mpp")
|
||||
}
|
||||
|
||||
[compileKotlin, compileTestKotlin]*.configure {
|
||||
kotlinOptions {
|
||||
kotlinOptions.jvmTarget = "1.8"
|
||||
freeCompilerArgs += ["-Xprogressive", "-XXLanguage:+NewInference", "-XXLanguage:+SamConversionForKotlinFunctions"]
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
groupId 'org.jetbrains.qa.combompp'
|
||||
artifactId 'plain-jvm'
|
||||
version publishing_version
|
||||
from components.java
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def complexLibAttribute = Attribute.of('org.jetbrains.qa.complexlib', String)
|
||||
|
||||
configurations.all {
|
||||
attributes { attribute(complexLibAttribute, 'jvmWithJava') }
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package calls.sourceCalls;
|
||||
|
||||
import calls.transitive_calls.sourceCalls.TheVeryTransitiveStory;
|
||||
import transitiveStory.apiJvm.beginning.KotlinApiContainer;
|
||||
import transitiveStory.apiJvm.jbeginning.JavaApiContainer;
|
||||
import transitiveStory.bottomActual.apiCall.Jvm18JApiInheritor;
|
||||
import transitiveStory.bottomActual.apiCall.Jvm18KApiInheritor;
|
||||
import transitiveStory.bottomActual.intermediateSrc.InBottomActualIntermediate;
|
||||
import transitiveStory.bottomActual.jApiCall.JApiCallerInJVM18;
|
||||
import transitiveStory.bottomActual.mppBeginning.BottomActualDeclarations;
|
||||
import transitiveStory.midActual.allTheCallsMirror.TheSameCallsButJava;
|
||||
import transitiveStory.midActual.commonSource.SomeMPPInTheCommon;
|
||||
import transitiveStory.midActual.sourceCalls.allTheCalls.INeedAllTheSourceSets;
|
||||
import transitiveStory.midActual.sourceCalls.intemediateCall.SecondModCaller;
|
||||
// import transitiveStory.bottomActual.mppBeginning.BottomActualDeclarations;
|
||||
import static transitiveStory.bottomActual.mppBeginning.BottomActualDeclarationsKt.regularTLfunInTheBottomActualCommmon;
|
||||
import static transitiveStory.midActual.commonSource.SomethinInTheCommonKt.regularTLfunInTheMidActualCommmon;
|
||||
|
||||
public class TheVeryTransitiveJava extends BottomActualDeclarations {
|
||||
// ========= api calls ==========
|
||||
// java
|
||||
JavaApiContainer javaApiContainer = new JavaApiContainer();
|
||||
|
||||
// kotlin
|
||||
KotlinApiContainer kotlinApiContainer = new KotlinApiContainer();
|
||||
|
||||
// ========= mpp-bottom-actual calls ==========
|
||||
// common source set
|
||||
String regularTLfunInTheBottomActualCall = regularTLfunInTheBottomActualCommmon("Some string from `plain-jvm` module, java source set");
|
||||
String inTheCompanionOfBottomActual = BottomActualDeclarations.Compainon.getInTheCompanionOfBottomActualDeclarations();
|
||||
|
||||
// intermediate source set
|
||||
int badSimple = new BottomActualDeclarations().getSimpleVal();
|
||||
int jIntermBottomActualCall = new InBottomActualIntermediate().getP();
|
||||
|
||||
// ========= jvm18 source set of `mpp-bottom-actual` ==========
|
||||
// java
|
||||
JApiCallerInJVM18 jApiCallerInJVM18 = new JApiCallerInJVM18();
|
||||
|
||||
// kotlin
|
||||
Jvm18KApiInheritor jvm18KApiInheritor = new Jvm18KApiInheritor();
|
||||
Jvm18JApiInheritor jvm18JApiInheritor = new Jvm18JApiInheritor();
|
||||
|
||||
// ========= mpp-mid-actual calls ==========
|
||||
// common source set
|
||||
String regTLfunInTeMidCommon = regularTLfunInTheMidActualCommmon("The message from `plain-jvm` module");
|
||||
int platformMppCall = new SomeMPPInTheCommon().getSimpleVal();
|
||||
|
||||
// intermediate source set
|
||||
SecondModCaller secondModCaller = new SecondModCaller();
|
||||
|
||||
// ========= jvmWithJava source set of `mpp-mid-actual` ==========
|
||||
// java
|
||||
TheSameCallsButJava theSameCallsButJava = new TheSameCallsButJava();
|
||||
|
||||
// kotlin
|
||||
INeedAllTheSourceSets iNeedAllTheSourceSets = new INeedAllTheSourceSets();
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Some basic printing from Java of `plain-jvm`: `" + new TheVeryTransitiveStory() + "`");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
package calls.transitive_calls.sourceCalls
|
||||
|
||||
import transitiveStory.apiJvm.beginning.KotlinApiContainer
|
||||
import transitiveStory.apiJvm.jbeginning.JavaApiContainer
|
||||
import transitiveStory.bottomActual.apiCall.Jvm18JApiInheritor
|
||||
import transitiveStory.bottomActual.apiCall.Jvm18KApiInheritor
|
||||
import transitiveStory.bottomActual.intermediateSrc.InBottomActualIntermediate
|
||||
import transitiveStory.bottomActual.intermediateSrc.IntermediateMPPClassInBottomActual
|
||||
import transitiveStory.bottomActual.jApiCall.JApiCallerInJVM18
|
||||
import transitiveStory.bottomActual.mppBeginning.BottomActualDeclarations
|
||||
import transitiveStory.bottomActual.mppBeginning.regularTLfunInTheBottomActualCommmon
|
||||
import transitiveStory.midActual.allTheCallsMirror.TheSameCallsButJava
|
||||
import transitiveStory.midActual.commonSource.SomeMPPInTheCommon
|
||||
import transitiveStory.midActual.commonSource.regularTLfunInTheMidActualCommmon
|
||||
import transitiveStory.midActual.sourceCalls.allTheCalls.INeedAllTheSourceSets
|
||||
import transitiveStory.midActual.sourceCalls.intemediateCall.SecondModCaller
|
||||
|
||||
class TheVeryTransitiveStory {
|
||||
// ========= api calls ==========
|
||||
// java
|
||||
val jApiOne = JavaApiContainer()
|
||||
|
||||
// kotlin
|
||||
val kApiOne = KotlinApiContainer()
|
||||
|
||||
// ========= mpp-bottom-actual calls ==========
|
||||
// common source set
|
||||
val interCallOne = regularTLfunInTheBottomActualCommmon("Some string from `mpp-mid-actual` module")
|
||||
val interCallTwo = BottomActualDeclarations.inTheCompanionOfBottomActualDeclarations
|
||||
val interCallThree = BottomActualDeclarations().simpleVal
|
||||
|
||||
// intermediate source set
|
||||
val interCallFour = InBottomActualIntermediate().p
|
||||
val interCallFive = IntermediateMPPClassInBottomActual()
|
||||
|
||||
// ========= jvm18 source set of `mpp-bottom-actual` ==========
|
||||
// java
|
||||
val interCallSix = JApiCallerInJVM18()
|
||||
|
||||
// kotlin
|
||||
val interCallSeven = Jvm18KApiInheritor()
|
||||
val interCallEight = Jvm18JApiInheritor()
|
||||
val interCallNine = IntermediateMPPClassInBottomActual()
|
||||
|
||||
// ========= mpp-mid-actual calls ==========
|
||||
// common source set
|
||||
val midCommonCallOne = regularTLfunInTheMidActualCommmon("The message from `plain-jvm` module")
|
||||
val midCommonCallTwo = SomeMPPInTheCommon().simpleVal
|
||||
|
||||
// intermediate source set
|
||||
val midIntermediateCall = SecondModCaller()
|
||||
class TransitiveInheritor : BottomActualDeclarations()
|
||||
|
||||
// ========= jvmWithJava source set of `mpp-mid-actual` ==========
|
||||
// java
|
||||
val midEndCallOne = TheSameCallsButJava()
|
||||
|
||||
// kotlin
|
||||
val midEndCallTwo = INeedAllTheSourceSets()
|
||||
|
||||
}
|
||||
|
||||
fun main() {
|
||||
val arg = TheVeryTransitiveStory()
|
||||
println("Test printing: `${arg.jApiOne}`; \n `${arg.kApiOne}`")
|
||||
}
|
||||
|
||||
class SomeWComp {
|
||||
companion object {
|
||||
val callMe = "sfjn"
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package playground
|
||||
|
||||
//inline class Foo(val i: Int)
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package kt33573tt
|
||||
|
||||
class SomeEPTest {
|
||||
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
rootProject.name = 'multimod-hmpp'
|
||||
include ':top-mpp', ':bottom-mpp', ':mpp-additional', ':api-jvm', ':plain-jvm'
|
||||
+183
@@ -0,0 +1,183 @@
|
||||
apply plugin: 'kotlin-multiplatform'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
group 'org.jetbrains.qa.combompp'
|
||||
version publishing_version
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
|
||||
def complexLibAttribute = Attribute.of('org.jetbrains.qa.complexlib', String)
|
||||
|
||||
kotlin {
|
||||
jvm("jvm18") {
|
||||
withJava()
|
||||
attributes { attribute(complexLibAttribute, 'jvmWithJava') }
|
||||
|
||||
compilations.all {
|
||||
kotlinOptions.jvmTarget = "1.8"
|
||||
}
|
||||
}
|
||||
js() {
|
||||
nodejs()
|
||||
}
|
||||
|
||||
linuxX64('linux') {
|
||||
// Binary configuration
|
||||
binaries {
|
||||
// Creating static library with a custom name.
|
||||
staticLib('customNameForLinuxLib') {
|
||||
outputDirectory = file("customNameForLinuxLib") // outputDir is a `val` property.
|
||||
linkTask.destinationDir = file("customNameForLinuxLib")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
macosX64('macos') {
|
||||
// Binary configuration
|
||||
binaries {
|
||||
// Creating static library with a custom name.
|
||||
staticLib('customNameForMacosLib') {
|
||||
outputDirectory = file("customNameForMacosLib") // outputDir is a `val` property.
|
||||
linkTask.destinationDir = file("customNameForMacosLib")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
iosX64("dummyiOS") {
|
||||
binaries {
|
||||
// KT-29395 fix
|
||||
framework {
|
||||
outputDirectory = file("fooDummyiOS") // outputDir is a `val` property.
|
||||
linkTask.destinationDir = file("fooDummyiOS")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// inline classes are enabled below
|
||||
targets.all {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs += ["-Xprogressive", "-XXLanguage:+NewInference", "-XXLanguage:+SamConversionForKotlinFunctions", "-Xuse-experimental=kotlin.ExperimentalMultiplatform"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
commonMain {
|
||||
dependencies { }
|
||||
}
|
||||
commonTest {
|
||||
dependencies { }
|
||||
}
|
||||
|
||||
// intermediate between commonMain and jsJvm18Main
|
||||
kt27816Main {
|
||||
dependsOn commonMain
|
||||
}
|
||||
|
||||
// creating a diamond
|
||||
jsJvm18iOSMain {
|
||||
kotlin.srcDir('src/jsJvm18iOSMain/cstmSrc')
|
||||
|
||||
// dependsOn commonMain
|
||||
dependsOn kt27816Main // an additional source set on the way to commonMain
|
||||
dependencies {
|
||||
//api "com.example:tmp-new-mpp-0312:0.0.1"
|
||||
}
|
||||
}
|
||||
|
||||
jsJvm18iOSTest {
|
||||
dependsOn commonTest
|
||||
dependencies { }
|
||||
}
|
||||
jsLinuxMain {
|
||||
dependsOn commonMain
|
||||
}
|
||||
|
||||
jsLinuxTest {
|
||||
dependsOn commonTest
|
||||
}
|
||||
|
||||
// setting up the targets source sets
|
||||
jvm18Main {
|
||||
kotlin.srcDir('src/jvm18Main/customSrc')
|
||||
|
||||
dependencies {
|
||||
// not in `common`, please: https://youtrack.jetbrains.com/issue/KT-28537
|
||||
api project(":api-jvm")
|
||||
}
|
||||
|
||||
// connecting to the diamond
|
||||
dependsOn jsJvm18iOSMain
|
||||
}
|
||||
jvm18Test {
|
||||
dependencies { }
|
||||
|
||||
// connecting to the diamond
|
||||
dependsOn jsJvm18iOSTest
|
||||
}
|
||||
|
||||
jsMain {
|
||||
dependencies {
|
||||
npm("left-pad", "*")
|
||||
}
|
||||
|
||||
// connecting to the diamond
|
||||
dependsOn jsJvm18iOSMain
|
||||
dependsOn jsLinuxMain
|
||||
}
|
||||
jsTest {
|
||||
dependencies {
|
||||
npm("left-pad", "*")
|
||||
}
|
||||
|
||||
// connecting to the diamond
|
||||
dependsOn jsJvm18iOSTest
|
||||
dependsOn jsLinuxTest
|
||||
}
|
||||
linuxMain {
|
||||
dependencies { }
|
||||
|
||||
// connecting to the diamond
|
||||
dependsOn jsLinuxMain
|
||||
}
|
||||
linuxTest {
|
||||
dependencies { }
|
||||
|
||||
// connecting to the diamond
|
||||
dependsOn jsLinuxTest
|
||||
}
|
||||
macosMain {
|
||||
dependencies { }
|
||||
}
|
||||
macosTest {
|
||||
dependencies { }
|
||||
}
|
||||
dummyiOSMain {
|
||||
// connecting to the diamond
|
||||
dependsOn jsJvm18iOSMain
|
||||
dependencies { }
|
||||
}
|
||||
dummyiOSTest {
|
||||
dependsOn jsJvm18iOSTest
|
||||
|
||||
dependencies { }
|
||||
}
|
||||
}
|
||||
}
|
||||
kotlin.sourceSets.all {
|
||||
it.languageSettings.enableLanguageFeature("InlineClasses")
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package transitiveStory.bottomActual.callingApi
|
||||
|
||||
/*
|
||||
fun bottActualApiCaller(k: KotlinApiContainer, s: JavaApiContainer) {
|
||||
// val first = privateKotlinDeclaration
|
||||
}*/
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
package transitiveStory.bottomActual.mppBeginning
|
||||
|
||||
val moduleName = "top-mpp"
|
||||
val commonInt = 42
|
||||
expect val sourceSetName: String
|
||||
|
||||
expect open class BottomActualDeclarations() {
|
||||
val simpleVal: Int
|
||||
|
||||
companion object Compainon {
|
||||
val inTheCompanionOfBottomActualDeclarations: String
|
||||
}
|
||||
}
|
||||
|
||||
fun regularTLfunInTheBottomActualCommmon(s: String): String {
|
||||
return "I'm a function at the top level of a file in `commonMain` source set of module $moduleName." +
|
||||
"This is the message I've got: \n`$s`"
|
||||
}
|
||||
|
||||
// shouldn't be resolved
|
||||
/*
|
||||
fun bottActualApiCaller(k: KotlinApiContainer, s: JavaApiContainer) {
|
||||
// val first = privateKotlinDeclaration
|
||||
}*/
|
||||
|
||||
internal val tlInternalInCommon = 42
|
||||
|
||||
// has a child in jsJvm18Main
|
||||
open class Outer {
|
||||
private val a = 1
|
||||
protected open val b = 2
|
||||
internal val c = 3
|
||||
val d = 4 // public by default
|
||||
|
||||
protected class Nested {
|
||||
public val e: Int = 5
|
||||
}
|
||||
}
|
||||
|
||||
// has a child in jsJvm18Main
|
||||
expect open class MPOuter {
|
||||
protected open val b: Int
|
||||
internal val c: Int
|
||||
val d: Int // public by default
|
||||
|
||||
protected class MPNested {
|
||||
public val e: Int
|
||||
}
|
||||
}
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package transitiveStory.bottomActual.test.smokeTest
|
||||
|
||||
import transitiveStory.bottomActual.mppBeginning.tlInternalInCommon
|
||||
|
||||
class BottomActualCommonTestCallerToBeCalled {
|
||||
// val apiCall = ForTheSmokeTest
|
||||
val callingInternal = tlInternalInCommon
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package transitiveStory.bottomActual.intermediateSrc
|
||||
|
||||
actual class IntermediateMPPClassInBottomActual
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package transitiveStory.bottomActual.mppBeginning
|
||||
|
||||
actual val sourceSetName: String = "dummyiOSMain"
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package forJsJvmOnly
|
||||
|
||||
actual class SomethinJsJvmaSpecial {
|
||||
}
|
||||
|
||||
expect class SomethinJsJvmaSpecial {
|
||||
}
|
||||
|
||||
expect class HavingActualNearby
|
||||
actual class HavingActualNearby
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package transitiveStory.bottomActual.intermediateSrc
|
||||
|
||||
import transitiveStory.bottomActual.mppBeginning.MPOuter
|
||||
import transitiveStory.bottomActual.mppBeginning.Outer
|
||||
import transitiveStory.bottomActual.mppBeginning.tlInternalInCommon
|
||||
|
||||
//import transitiveStory.bottomActual.mppBeginning.tlInternalInCommon
|
||||
|
||||
class InBottomActualIntermediate {
|
||||
val p = 42
|
||||
// https://youtrack.jetbrains.com/issue/KT-37264
|
||||
val callingInteral = tlInternalInCommon
|
||||
}
|
||||
|
||||
expect class IntermediateMPPClassInBottomActual()
|
||||
|
||||
|
||||
class Subclass : Outer() {
|
||||
// a is not visible
|
||||
// b, c and d are visible
|
||||
// Nested and e are visible
|
||||
|
||||
override val b = 5 // 'b' is protected
|
||||
}
|
||||
|
||||
class ChildOfCommonInShared : Outer() {
|
||||
override val b: Int
|
||||
get() = super.b + 243
|
||||
// val callAlso = super.c // internal in Outer
|
||||
|
||||
private val other = Nested()
|
||||
}
|
||||
|
||||
class ChildOfMPOuterInShared : MPOuter() {
|
||||
private val sav = MPNested()
|
||||
}
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package transitiveStory.bottomActual.mppBeginning
|
||||
|
||||
actual open class BottomActualDeclarations {
|
||||
actual val simpleVal: Int = commonInt
|
||||
|
||||
actual companion object Compainon {
|
||||
actual val inTheCompanionOfBottomActualDeclarations: String =
|
||||
"I'm a string from the companion object of `$this` in `$sourceSetName` module `$moduleName`"
|
||||
}
|
||||
}
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package transitiveStory.bottomActual.mppBeginning
|
||||
|
||||
// has a child in jsJvm18Main
|
||||
actual open class MPOuter {
|
||||
protected actual open val b: Int = 2565
|
||||
internal actual val c: Int = 2456
|
||||
actual val d: Int = 324
|
||||
|
||||
protected actual class MPNested {
|
||||
actual val e: Int = 245
|
||||
}
|
||||
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
package transitiveStory
|
||||
|
||||
class BottomActualIntermTestCallerToBeCalled {
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package transitiveStory.bottomActual.mid.jtest
|
||||
|
||||
import transitiveStory.bottomActual.mppBeginning.tlInternalInCommon
|
||||
|
||||
// val theInapropr = KotlinApiContainer()
|
||||
|
||||
val iShouldntFail = tlInternalInCommon
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package transitiveStory.bottomActual.intermediateSrc
|
||||
|
||||
actual class IntermediateMPPClassInBottomActual
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package transitiveStory.bottomActual.mppBeginning
|
||||
|
||||
actual val sourceSetName: String = "jsMain"
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package transitiveStory.bottomActual.jApiCall;
|
||||
|
||||
import transitiveStory.apiJvm.beginning.KotlinApiContainer;
|
||||
import transitiveStory.apiJvm.jbeginning.JavaApiContainer;
|
||||
|
||||
public class JApiCallerInJVM18 extends JavaApiContainer {
|
||||
String protectedCall = protectedJavaDeclaration;
|
||||
KotlinApiContainer kotlinApiContainer = new KotlinApiContainer();
|
||||
|
||||
void caller(JavaApiContainer j) {
|
||||
String s1 = j.publicJavaDeclaration;
|
||||
String s2 = publicStaticJavaDeclaration;
|
||||
String s3 = kotlinApiContainer.getPublicKotlinDeclaration();
|
||||
//String s4 = kotlinApiContainer.getPackageVisibleKotlinDeclaration$api_jvm();
|
||||
}
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package transitiveStory.bottomActual.apiCall
|
||||
|
||||
import playground.moduleName
|
||||
import transitiveStory.apiJvm.beginning.KotlinApiContainer
|
||||
import transitiveStory.apiJvm.jbeginning.JavaApiContainer
|
||||
|
||||
open class Jvm18JApiInheritor : JavaApiContainer() {
|
||||
// override var protectedJavaDeclaration = ""
|
||||
var callProtectedJavaDeclaration = protectedJavaDeclaration
|
||||
}
|
||||
|
||||
open class Jvm18KApiInheritor : KotlinApiContainer() {
|
||||
public override val protectedKotlinDeclaration =
|
||||
"I'm an overridden Kotlin string in `$this` from `" + moduleName +
|
||||
"` and shall be never visible to the other modules except my subclasses."
|
||||
}
|
||||
|
||||
/**
|
||||
* Some class which type is lately used in the function.
|
||||
*
|
||||
*/
|
||||
open class FindMyDocumantationPlease
|
||||
|
||||
/**
|
||||
* A function using a class type placed right into the same file.
|
||||
*
|
||||
* @param f The parameter of the type under the investigation
|
||||
* */
|
||||
fun iWantSomeDocumentationFromDokka(f: FindMyDocumantationPlease) {}
|
||||
|
||||
fun bottActualApiCaller(k: KotlinApiContainer, s: JavaApiContainer, ij: Jvm18JApiInheritor, ik: Jvm18KApiInheritor) {
|
||||
// val first = k.privateKotlinDeclaration
|
||||
// val second = k.packageVisibleKotlinDeclaration
|
||||
// val third = k.protectedKotlinDeclaration
|
||||
val fourth = ik.protectedKotlinDeclaration
|
||||
val fifth = k.publicKotlinDeclaration
|
||||
val sixth = KotlinApiContainer.publicStaticKotlinDeclaration
|
||||
|
||||
// val seventh = s.privateJavaDeclaration
|
||||
// val eighth = s.packageVisibleJavaDeclaration
|
||||
val ninth = s.publicJavaDeclaration
|
||||
val tenth = JavaApiContainer.publicStaticJavaDeclaration
|
||||
// val eleventh = ij.protectedJavaDeclaration
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package transitiveStory.bottomActual.intermediateSrc
|
||||
|
||||
actual class IntermediateMPPClassInBottomActual
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package transitiveStory.bottomActual.mppBeginning
|
||||
|
||||
actual val sourceSetName: String = "jvmMain"
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package transitiveStory.bottomActual.mid.jtest.smokeTest;
|
||||
|
||||
import transitiveStory.apiJvm.beginning.KotlinApiContainer;
|
||||
import transitiveStory.apiJvm.jbeginning.JavaApiContainer;
|
||||
import transitiveStory.bottomActual.intermediateSrc.InBottomActualIntermediate;
|
||||
import transitiveStory.bottomActual.intermediateSrc.IntermediateMPPClassInBottomActual;
|
||||
|
||||
public class BottmoActualPlatformJTest {
|
||||
// ================ api =================
|
||||
// java
|
||||
// JClassForTheSmokeTestFromApi jClassForTheSmokeTestFromApi = new JClassForTheSmokeTestFromApi();
|
||||
JavaApiContainer javaApiContainer = new JavaApiContainer();
|
||||
|
||||
// kotlin
|
||||
// ForTheSmokeTestFromApi forTheSmokeTestFromApi = new ForTheSmokeTestFromApi();
|
||||
KotlinApiContainer kotlinApiContainer = new KotlinApiContainer();
|
||||
|
||||
// ================ intermediate src of this module =================
|
||||
InBottomActualIntermediate inBottomActualIntermediate = new InBottomActualIntermediate();
|
||||
|
||||
// ================ jvm18Main =================
|
||||
IntermediateMPPClassInBottomActual intermediateMPPClassInBottomActual = new IntermediateMPPClassInBottomActual();
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package transitiveStory.bottomActual.mid.jtest.smokeTest
|
||||
|
||||
import transitiveStory.apiJvm.beginning.KotlinApiContainer
|
||||
import transitiveStory.apiJvm.jbeginning.JavaApiContainer
|
||||
import transitiveStory.bottomActual.intermediateSrc.InBottomActualIntermediate
|
||||
import transitiveStory.bottomActual.intermediateSrc.IntermediateMPPClassInBottomActual
|
||||
|
||||
class BottmoActualPlatformKTest {
|
||||
// ================ api =================
|
||||
// java
|
||||
// JClassForTheSmokeTestFromApi jClassForTheSmokeTestFromApi = new JClassForTheSmokeTestFromApi();
|
||||
internal var javaApiContainer =
|
||||
JavaApiContainer()
|
||||
|
||||
// kotlin
|
||||
// ForTheSmokeTestFromApi forTheSmokeTestFromApi = new ForTheSmokeTestFromApi();
|
||||
internal var kotlinApiContainer =
|
||||
KotlinApiContainer()
|
||||
|
||||
// ================ intermediate src of this module =================
|
||||
internal var inBottomActualIntermediate =
|
||||
InBottomActualIntermediate()
|
||||
|
||||
// ================ jvm18Main =================
|
||||
internal var intermediateMPPClassInBottomActual =
|
||||
IntermediateMPPClassInBottomActual()
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package transitiveStory.bottomActual.mppBeginning
|
||||
|
||||
actual open class BottomActualDeclarations {
|
||||
actual val simpleVal: Int = commonInt
|
||||
|
||||
actual companion object Compainon {
|
||||
actual val inTheCompanionOfBottomActualDeclarations: String =
|
||||
"I'm a string from the companion object of `$this` in `$sourceSetName` module `$moduleName`"
|
||||
}
|
||||
}
|
||||
|
||||
actual val sourceSetName: String = "linuxMain"
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package transitiveStory.bottomActual.mppBeginning
|
||||
|
||||
actual open class MPOuter {
|
||||
protected actual open val b: Int = 65
|
||||
internal actual val c: Int = 235
|
||||
actual val d: Int = 235
|
||||
|
||||
protected actual class MPNested {
|
||||
actual val e: Int = 2452
|
||||
}
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package transitiveStory.bottomActual.mppBeginning
|
||||
|
||||
actual open class BottomActualDeclarations {
|
||||
actual val simpleVal: Int = commonInt
|
||||
|
||||
actual companion object Compainon {
|
||||
actual val inTheCompanionOfBottomActualDeclarations: String =
|
||||
"I'm a string from the companion object of `$this` in `$sourceSetName` module `$moduleName`"
|
||||
}
|
||||
}
|
||||
|
||||
actual open class MPOuter {
|
||||
protected actual open val b: Int = 4325
|
||||
internal actual val c: Int = 2345
|
||||
actual val d: Int = 325
|
||||
|
||||
protected actual class MPNested {
|
||||
actual val e: Int = 345
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class ChildOfCommonInMacos : Outer() {
|
||||
override val b: Int
|
||||
get() = super.b + 243
|
||||
val callAlso = super.c // internal in Outer
|
||||
|
||||
private val other = Nested()
|
||||
}
|
||||
|
||||
class ChildOfMPOuterInMacos : MPOuter() {
|
||||
private val sav = MPNested()
|
||||
}
|
||||
|
||||
actual val sourceSetName: String = "macosMain"
|
||||
Reference in New Issue
Block a user