Wizard: add test infrastructure, project importing tests & project templates tests
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
resolutionStrategy {
|
||||
eachPlugin {
|
||||
if (requested.id.namespace == 'com.android' || requested.id.name == 'kotlin-android-extensions') {
|
||||
useModule('com.android.tools.build:gradle:3.5.2')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
rootProject.name = 'generatedProject'
|
||||
|
||||
|
||||
include(':android')
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
resolutionStrategy {
|
||||
eachPlugin {
|
||||
if (requested.id.namespace == "com.android" || requested.id.name == "kotlin-android-extensions") {
|
||||
useModule("com.android.tools.build:gradle:3.5.2")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
rootProject.name = "generatedProject"
|
||||
|
||||
|
||||
include(":android")
|
||||
+1
-5
@@ -6,8 +6,4 @@ kotlin:
|
||||
- type:
|
||||
name: android
|
||||
androidSdkPath: /home/user/Android/Sdk
|
||||
kind: singleplatformJvm
|
||||
name: android
|
||||
sourcesets:
|
||||
- type: main
|
||||
- type: test
|
||||
name: android
|
||||
+1
@@ -0,0 +1 @@
|
||||
rootProject.name = 'generatedProject'
|
||||
+1
@@ -0,0 +1 @@
|
||||
rootProject.name = "generatedProject"
|
||||
+1
-10
@@ -2,20 +2,11 @@ kotlin:
|
||||
projectKind: Multiplatform
|
||||
modules:
|
||||
- type: multiplatform
|
||||
kind: multiplatform
|
||||
name: a
|
||||
subModules:
|
||||
- type: jsNode
|
||||
kind: target
|
||||
name: nodeJs
|
||||
sourcesets:
|
||||
- type: main
|
||||
- type: test
|
||||
- type:
|
||||
name: jsBrowser
|
||||
testFramework: JS
|
||||
kind: target
|
||||
name: browser
|
||||
sourcesets:
|
||||
- type: main
|
||||
- type: test
|
||||
name: browser
|
||||
+1
@@ -0,0 +1 @@
|
||||
rootProject.name = 'generatedProject'
|
||||
+1
@@ -0,0 +1 @@
|
||||
rootProject.name = "generatedProject"
|
||||
+1
-6
@@ -2,15 +2,10 @@ kotlin:
|
||||
projectKind: Multiplatform
|
||||
modules:
|
||||
- type: multiplatform
|
||||
kind: multiplatform
|
||||
name: a
|
||||
subModules:
|
||||
- type:
|
||||
targetJvmVersion: "1.8"
|
||||
name: jvmTarget
|
||||
testFramework: JUNIT4
|
||||
kind: target
|
||||
name: jvm
|
||||
sourcesets:
|
||||
- type: main
|
||||
- type: test
|
||||
name: jvm
|
||||
+1
@@ -0,0 +1 @@
|
||||
// runForMaven true
|
||||
+1
@@ -0,0 +1 @@
|
||||
rootProject.name = 'generatedProject'
|
||||
+1
@@ -0,0 +1 @@
|
||||
rootProject.name = "generatedProject"
|
||||
+1
-5
@@ -5,8 +5,4 @@ kotlin:
|
||||
targetJvmVersion: "1.6"
|
||||
name: JVM Module
|
||||
testFramework: JUNIT4
|
||||
name: nya
|
||||
kind: singleplatformJvm
|
||||
sourcesets:
|
||||
- type: main
|
||||
|
||||
name: nya
|
||||
+1
@@ -0,0 +1 @@
|
||||
rootProject.name = 'generatedProject'
|
||||
+1
@@ -0,0 +1 @@
|
||||
rootProject.name = "generatedProject"
|
||||
+1
-6
@@ -2,12 +2,7 @@ kotlin:
|
||||
projectKind: Multiplatform
|
||||
modules:
|
||||
- type: multiplatform
|
||||
kind: multiplatform
|
||||
name: a
|
||||
subModules:
|
||||
- type: nativeForCurrentSystem
|
||||
kind: target
|
||||
name: myNative
|
||||
sourcesets:
|
||||
- type: main
|
||||
- type: test
|
||||
name: myNative
|
||||
+1
@@ -0,0 +1 @@
|
||||
rootProject.name = 'generatedProject'
|
||||
+1
@@ -0,0 +1 @@
|
||||
rootProject.name = "generatedProject"
|
||||
+1
-10
@@ -2,23 +2,14 @@ kotlin:
|
||||
projectKind: Multiplatform
|
||||
modules:
|
||||
- type: multiplatform
|
||||
kind: multiplatform
|
||||
name: a
|
||||
subModules:
|
||||
- type:
|
||||
targetJvmVersion: "9"
|
||||
name: jvmTarget
|
||||
testFramework: JUNIT4
|
||||
kind: target
|
||||
name: jvm
|
||||
sourcesets:
|
||||
- type: main
|
||||
- type: test
|
||||
- type:
|
||||
name: jsBrowser
|
||||
testFramework: JS
|
||||
kind: target
|
||||
name: a
|
||||
sourcesets:
|
||||
- type: main
|
||||
- type: test
|
||||
name: a
|
||||
+1
@@ -0,0 +1 @@
|
||||
rootProject.name = 'generatedProject'
|
||||
+1
@@ -0,0 +1 @@
|
||||
rootProject.name = "generatedProject"
|
||||
+1
-6
@@ -2,12 +2,7 @@ kotlin:
|
||||
projectKind: Multiplatform
|
||||
modules:
|
||||
- type: multiplatform
|
||||
kind: multiplatform
|
||||
name: a
|
||||
subModules:
|
||||
- type: linuxX64Target
|
||||
kind: target
|
||||
name: linuxX64
|
||||
sourcesets:
|
||||
- type: main
|
||||
- type: test
|
||||
name: linuxX64
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
plugins {
|
||||
id 'org.jetbrains.kotlin.js' version '1.3.61'
|
||||
}
|
||||
group = 'testGroupId'
|
||||
version = '1.0-SNAPSHOT'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
testImplementation 'org.jetbrains.kotlin:kotlin-test-js'
|
||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-js'
|
||||
}
|
||||
kotlin.target.browser { }
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
plugins {
|
||||
kotlin("js") version "1.3.61"
|
||||
}
|
||||
group = "testGroupId"
|
||||
version = "1.0-SNAPSHOT"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
testImplementation(kotlin("test-js"))
|
||||
implementation(kotlin("stdlib-js"))
|
||||
}
|
||||
kotlin.target.browser { }
|
||||
+1
@@ -0,0 +1 @@
|
||||
rootProject.name = 'generatedProject'
|
||||
+1
@@ -0,0 +1 @@
|
||||
rootProject.name = "generatedProject"
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
kotlin:
|
||||
projectKind: js
|
||||
modules:
|
||||
- type: jsSinglepaltform
|
||||
name: a
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'org.jetbrains.kotlin.android' version '1.3.61'
|
||||
id 'kotlin-android-extensions'
|
||||
}
|
||||
group = 'me.user'
|
||||
version = '1.0-SNAPSHOT'
|
||||
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
implementation 'androidx.core:core-ktx:1.1.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7'
|
||||
}
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
defaultConfig {
|
||||
applicationId 'me.user.app'
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 29
|
||||
versionCode 1
|
||||
versionName '1.0'
|
||||
}
|
||||
buildTypes {
|
||||
'release' {
|
||||
minifyEnabled false
|
||||
}
|
||||
}
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
kotlin("android") version "1.3.61"
|
||||
id("kotlin-android-extensions")
|
||||
}
|
||||
group = "me.user"
|
||||
version = "1.0-SNAPSHOT"
|
||||
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
implementation("androidx.core:core-ktx:1.1.0")
|
||||
implementation("androidx.appcompat:appcompat:1.1.0")
|
||||
implementation("androidx.constraintlayout:constraintlayout:1.1.3")
|
||||
implementation(kotlin("stdlib-jdk7"))
|
||||
}
|
||||
android {
|
||||
compileSdkVersion(29)
|
||||
defaultConfig {
|
||||
applicationId = "me.user.app"
|
||||
minSdkVersion(24)
|
||||
targetSdkVersion(29)
|
||||
versionCode = 1
|
||||
versionName = "1.0"
|
||||
}
|
||||
buildTypes {
|
||||
getByName("release") {
|
||||
isMinifyEnabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
group = 'me.user'
|
||||
version = '1.0-SNAPSHOT'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
group = "me.user"
|
||||
version = "1.0-SNAPSHOT"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
resolutionStrategy {
|
||||
eachPlugin {
|
||||
if (requested.id.namespace == 'com.android' || requested.id.name == 'kotlin-android-extensions') {
|
||||
useModule('com.android.tools.build:gradle:3.5.2')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
rootProject.name = 'AndroidApplication'
|
||||
|
||||
|
||||
include(':app')
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
resolutionStrategy {
|
||||
eachPlugin {
|
||||
if (requested.id.namespace == "com.android" || requested.id.name == "kotlin-android-extensions") {
|
||||
useModule("com.android.tools.build:gradle:3.5.2")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
rootProject.name = "AndroidApplication"
|
||||
|
||||
|
||||
include(":app")
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
android:
|
||||
androidSdkPath: android.sdk
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
plugins {
|
||||
id 'org.jetbrains.kotlin.multiplatform' version '1.3.61'
|
||||
}
|
||||
group = 'me.user'
|
||||
version = '1.0-SNAPSHOT'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
kotlin {
|
||||
|
||||
sourceSets {
|
||||
commonMain {
|
||||
dependencies {
|
||||
implementation kotlin('stdlib-common')
|
||||
}
|
||||
}
|
||||
commonTest {
|
||||
dependencies {
|
||||
implementation kotlin('test-common')
|
||||
implementation kotlin('test-annotations-common')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
plugins {
|
||||
kotlin("multiplatform") version "1.3.61"
|
||||
}
|
||||
group = "me.user"
|
||||
version = "1.0-SNAPSHOT"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
kotlin {
|
||||
|
||||
sourceSets {
|
||||
val commonMain by getting {
|
||||
dependencies {
|
||||
implementation(kotlin("stdlib-common"))
|
||||
}
|
||||
}
|
||||
val commonTest by getting {
|
||||
dependencies {
|
||||
implementation(kotlin("test-common"))
|
||||
implementation(kotlin("test-annotations-common"))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
rootProject.name = 'EmptyMultiplatform'
|
||||
+1
@@ -0,0 +1 @@
|
||||
rootProject.name = "EmptyMultiplatform"
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
id 'org.jetbrains.kotlin.jvm' version '1.3.61'
|
||||
}
|
||||
group = 'me.user'
|
||||
version = '1.0-SNAPSHOT'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit'
|
||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
|
||||
}
|
||||
tasks.withType(KotlinCompile) {
|
||||
kotlinOptions.jvmTarget = '1.8'
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
kotlin("jvm") version "1.3.61"
|
||||
}
|
||||
group = "me.user"
|
||||
version = "1.0-SNAPSHOT"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
testImplementation(kotlin("test-junit"))
|
||||
implementation(kotlin("stdlib-jdk8"))
|
||||
}
|
||||
tasks.withType<KotlinCompile>() {
|
||||
kotlinOptions.jvmTarget = "1.8"
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
// runForMaven true
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>mainModule</artifactId>
|
||||
<groupId>me.user</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>mainModule</name>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<kotlin.code.style>official</kotlin.code.style>
|
||||
<kotlin.compiler.jvmTarget>1.8</kotlin.compiler.jvmTarget>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>mavenCentral</id>
|
||||
<url>https://repo1.maven.org/maven2/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<build>
|
||||
<sourceDirectory>src/main/kotlin</sourceDirectory>
|
||||
<testSourceDirectory>src/test/kotlin</testSourceDirectory>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-maven-plugin</artifactId>
|
||||
<version>1.3.61</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>compile</id>
|
||||
<phase>compile</phase>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>test-compile</id>
|
||||
<phase>test-compile</phase>
|
||||
<goals>
|
||||
<goal>test-compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-test-junit</artifactId>
|
||||
<version>1.3.61</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-stdlib-jdk8</artifactId>
|
||||
<version>1.3.61</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
+1
@@ -0,0 +1 @@
|
||||
rootProject.name = 'EmptySingleplatform'
|
||||
+1
@@ -0,0 +1 @@
|
||||
rootProject.name = "EmptySingleplatform"
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
plugins {
|
||||
id 'org.jetbrains.kotlin.js' version '1.3.61'
|
||||
}
|
||||
group = 'me.user'
|
||||
version = '1.0-SNAPSHOT'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
maven {
|
||||
url 'https://dl.bintray.com/kotlin/kotlin-js-wrappers'
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
testImplementation 'org.jetbrains.kotlin:kotlin-test-js'
|
||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-js'
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-html-js:0.6.12'
|
||||
implementation 'org.jetbrains:kotlin-react:16.9.0-pre.89-kotlin-1.3.60'
|
||||
implementation 'org.jetbrains:kotlin-react-dom:16.9.0-pre.89-kotlin-1.3.60'
|
||||
implementation npm('react','16.12.0')
|
||||
implementation npm('react-dom','16.12.0')
|
||||
implementation npm('react-is','16.12.0')
|
||||
implementation 'org.jetbrains:kotlin-styled:1.0.0-pre.89-kotlin-1.3.60'
|
||||
implementation npm('styled-components','5.0.0')
|
||||
implementation npm('inline-style-prefixer','5.1.0')
|
||||
}
|
||||
kotlin.target.browser { }
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
plugins {
|
||||
kotlin("js") version "1.3.61"
|
||||
}
|
||||
group = "me.user"
|
||||
version = "1.0-SNAPSHOT"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
maven {
|
||||
url = uri("https://dl.bintray.com/kotlin/kotlin-js-wrappers")
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
testImplementation(kotlin("test-js"))
|
||||
implementation(kotlin("stdlib-js"))
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-html-js:0.6.12")
|
||||
implementation("org.jetbrains:kotlin-react:16.9.0-pre.89-kotlin-1.3.60")
|
||||
implementation("org.jetbrains:kotlin-react-dom:16.9.0-pre.89-kotlin-1.3.60")
|
||||
implementation(npm("react","16.12.0"))
|
||||
implementation(npm("react-dom","16.12.0"))
|
||||
implementation(npm("react-is","16.12.0"))
|
||||
implementation("org.jetbrains:kotlin-styled:1.0.0-pre.89-kotlin-1.3.60")
|
||||
implementation(npm("styled-components","5.0.0"))
|
||||
implementation(npm("inline-style-prefixer","5.1.0"))
|
||||
}
|
||||
kotlin.target.browser { }
|
||||
+1
@@ -0,0 +1 @@
|
||||
rootProject.name = 'JsBrowserApplication'
|
||||
+1
@@ -0,0 +1 @@
|
||||
rootProject.name = "JsBrowserApplication"
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
id 'org.jetbrains.kotlin.jvm' version '1.3.61'
|
||||
id 'application'
|
||||
}
|
||||
group = 'me.user'
|
||||
version = '1.0-SNAPSHOT'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit'
|
||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
|
||||
}
|
||||
tasks.withType(KotlinCompile) {
|
||||
kotlinOptions.jvmTarget = '1.8'
|
||||
}
|
||||
application {
|
||||
mainClassName = 'MainKt'
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
kotlin("jvm") version "1.3.61"
|
||||
application
|
||||
}
|
||||
group = "me.user"
|
||||
version = "1.0-SNAPSHOT"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
testImplementation(kotlin("test-junit"))
|
||||
implementation(kotlin("stdlib-jdk8"))
|
||||
}
|
||||
tasks.withType<KotlinCompile>() {
|
||||
kotlinOptions.jvmTarget = "1.8"
|
||||
}
|
||||
application {
|
||||
mainClassName = "MainKt"
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
// runForMaven true
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>consoleApp</artifactId>
|
||||
<groupId>me.user</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>consoleApp</name>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<kotlin.code.style>official</kotlin.code.style>
|
||||
<kotlin.compiler.jvmTarget>1.8</kotlin.compiler.jvmTarget>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>mavenCentral</id>
|
||||
<url>https://repo1.maven.org/maven2/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<build>
|
||||
<sourceDirectory>src/main/kotlin</sourceDirectory>
|
||||
<testSourceDirectory>src/test/kotlin</testSourceDirectory>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-maven-plugin</artifactId>
|
||||
<version>1.3.61</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>compile</id>
|
||||
<phase>compile</phase>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>test-compile</id>
|
||||
<phase>test-compile</phase>
|
||||
<goals>
|
||||
<goal>test-compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>1.6.0</version>
|
||||
<configuration>
|
||||
<mainClass>MainKt</mainClass>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-test-junit</artifactId>
|
||||
<version>1.3.61</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-stdlib-jdk8</artifactId>
|
||||
<version>1.3.61</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
+1
@@ -0,0 +1 @@
|
||||
rootProject.name = 'JvmConsoleApplication'
|
||||
+1
@@ -0,0 +1 @@
|
||||
rootProject.name = "JvmConsoleApplication"
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpack
|
||||
|
||||
plugins {
|
||||
id 'org.jetbrains.kotlin.multiplatform' version '1.3.61'
|
||||
id 'application'
|
||||
}
|
||||
group = 'me.user'
|
||||
version = '1.0-SNAPSHOT'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
maven {
|
||||
url 'https://dl.bintray.com/kotlin/ktor'
|
||||
}
|
||||
maven {
|
||||
url 'https://dl.bintray.com/kotlin/kotlin-js-wrappers'
|
||||
}
|
||||
}
|
||||
kotlin {
|
||||
jvm {
|
||||
compilations.all {
|
||||
kotlinOptions.jvmTarget = '1.8'
|
||||
}
|
||||
withJava()
|
||||
}
|
||||
js {
|
||||
browser {
|
||||
|
||||
}
|
||||
}
|
||||
sourceSets {
|
||||
jvmMain {
|
||||
dependencies {
|
||||
implementation kotlin('stdlib-jdk8')
|
||||
implementation 'io.ktor:ktor-server-netty:1.2.6'
|
||||
implementation 'io.ktor:ktor-html-builder:1.2.6'
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-html-jvm:0.6.12'
|
||||
}
|
||||
}
|
||||
jvmTest {
|
||||
dependencies {
|
||||
implementation kotlin('test-junit')
|
||||
}
|
||||
}
|
||||
jsMain {
|
||||
dependencies {
|
||||
implementation kotlin('stdlib-js')
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-html-js:0.6.12'
|
||||
implementation 'org.jetbrains:kotlin-react:16.9.0-pre.89-kotlin-1.3.60'
|
||||
implementation 'org.jetbrains:kotlin-react-dom:16.9.0-pre.89-kotlin-1.3.60'
|
||||
implementation npm('react','16.12.0')
|
||||
implementation npm('react-dom','16.12.0')
|
||||
implementation npm('react-is','16.12.0')
|
||||
implementation 'org.jetbrains:kotlin-styled:1.0.0-pre.89-kotlin-1.3.60'
|
||||
implementation npm('styled-components','5.0.0')
|
||||
implementation npm('inline-style-prefixer','5.1.0')
|
||||
}
|
||||
}
|
||||
jsTest {
|
||||
dependencies {
|
||||
implementation kotlin('test-js')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
application {
|
||||
mainClassName = 'ServerKt'
|
||||
}
|
||||
tasks.getByName('jsBrowserProductionWebpack') {
|
||||
outputFileName = 'output.js'
|
||||
}
|
||||
tasks.getByName('jvmJar') {
|
||||
dependsOn(tasks.getByName('jsBrowserProductionWebpack'))
|
||||
def jsBrowserProductionWebpack = tasks.getByName('jsBrowserProductionWebpack')
|
||||
from(new File(jsBrowserProductionWebpack.destinationDirectory, jsBrowserProductionWebpack.outputFileName))
|
||||
}
|
||||
tasks.getByName('run') {
|
||||
dependsOn(tasks.getByName('jvmJar'))
|
||||
classpath(tasks.getByName('jvmJar'))
|
||||
}
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpack
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform") version "1.3.61"
|
||||
application
|
||||
}
|
||||
group = "me.user"
|
||||
version = "1.0-SNAPSHOT"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
maven {
|
||||
url = uri("https://dl.bintray.com/kotlin/ktor")
|
||||
}
|
||||
maven {
|
||||
url = uri("https://dl.bintray.com/kotlin/kotlin-js-wrappers")
|
||||
}
|
||||
}
|
||||
kotlin {
|
||||
jvm {
|
||||
compilations.all {
|
||||
kotlinOptions.jvmTarget = "1.8"
|
||||
}
|
||||
withJava()
|
||||
}
|
||||
js {
|
||||
browser {
|
||||
|
||||
}
|
||||
}
|
||||
sourceSets {
|
||||
val jvmMain by getting {
|
||||
dependencies {
|
||||
implementation(kotlin("stdlib-jdk8"))
|
||||
implementation("io.ktor:ktor-server-netty:1.2.6")
|
||||
implementation("io.ktor:ktor-html-builder:1.2.6")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-html-jvm:0.6.12")
|
||||
}
|
||||
}
|
||||
val jvmTest by getting {
|
||||
dependencies {
|
||||
implementation(kotlin("test-junit"))
|
||||
}
|
||||
}
|
||||
val jsMain by getting {
|
||||
dependencies {
|
||||
implementation(kotlin("stdlib-js"))
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-html-js:0.6.12")
|
||||
implementation("org.jetbrains:kotlin-react:16.9.0-pre.89-kotlin-1.3.60")
|
||||
implementation("org.jetbrains:kotlin-react-dom:16.9.0-pre.89-kotlin-1.3.60")
|
||||
implementation(npm("react","16.12.0"))
|
||||
implementation(npm("react-dom","16.12.0"))
|
||||
implementation(npm("react-is","16.12.0"))
|
||||
implementation("org.jetbrains:kotlin-styled:1.0.0-pre.89-kotlin-1.3.60")
|
||||
implementation(npm("styled-components","5.0.0"))
|
||||
implementation(npm("inline-style-prefixer","5.1.0"))
|
||||
}
|
||||
}
|
||||
val jsTest by getting {
|
||||
dependencies {
|
||||
implementation(kotlin("test-js"))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
application {
|
||||
mainClassName = "ServerKt"
|
||||
}
|
||||
tasks.getByName<KotlinWebpack>("jsBrowserProductionWebpack") {
|
||||
outputFileName = "output.js"
|
||||
}
|
||||
tasks.getByName<Jar>("jvmJar") {
|
||||
dependsOn(tasks.getByName("jsBrowserProductionWebpack"))
|
||||
val jsBrowserProductionWebpack = tasks.getByName<KotlinWebpack>("jsBrowserProductionWebpack")
|
||||
from(File(jsBrowserProductionWebpack.destinationDirectory, jsBrowserProductionWebpack.outputFileName))
|
||||
}
|
||||
tasks.getByName<JavaExec>("run") {
|
||||
dependsOn(tasks.getByName<Jar>("jvmJar"))
|
||||
classpath(tasks.getByName<Jar>("jvmJar"))
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
rootProject.name = 'JvmServerJsClient'
|
||||
+1
@@ -0,0 +1 @@
|
||||
rootProject.name = "JvmServerJsClient"
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTargetWithTests
|
||||
|
||||
plugins {
|
||||
id 'org.jetbrains.kotlin.multiplatform' version '1.3.61'
|
||||
}
|
||||
group = 'me.user'
|
||||
version = '1.0-SNAPSHOT'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
kotlin {
|
||||
jvm {
|
||||
compilations.all {
|
||||
kotlinOptions.jvmTarget = '1.8'
|
||||
}
|
||||
}
|
||||
js {
|
||||
browser {
|
||||
|
||||
}
|
||||
}
|
||||
def hostOs = System.getProperty("os.name")
|
||||
def isMingwX64 = hostOs.startsWith("Windows")
|
||||
KotlinNativeTargetWithTests nativeTarget
|
||||
if (hostOs == "Mac OS X") nativeTarget = macosX64('native')
|
||||
else if (hostOs == "Linux") nativeTarget = linuxX64("native")
|
||||
else if (isMingwX64) nativeTarget = mingwX64("native")
|
||||
else throw new GradleException("Host OS is not supported in Kotlin/Native.")
|
||||
|
||||
|
||||
sourceSets {
|
||||
commonMain {
|
||||
dependencies {
|
||||
implementation kotlin('stdlib-common')
|
||||
}
|
||||
}
|
||||
commonTest {
|
||||
dependencies {
|
||||
implementation kotlin('test-common')
|
||||
implementation kotlin('test-annotations-common')
|
||||
}
|
||||
}
|
||||
jvmMain {
|
||||
dependencies {
|
||||
implementation kotlin('stdlib-jdk8')
|
||||
}
|
||||
}
|
||||
jvmTest {
|
||||
dependencies {
|
||||
implementation kotlin('test-junit')
|
||||
}
|
||||
}
|
||||
jsMain {
|
||||
dependencies {
|
||||
implementation kotlin('stdlib-js')
|
||||
}
|
||||
}
|
||||
jsTest {
|
||||
dependencies {
|
||||
implementation kotlin('test-js')
|
||||
}
|
||||
}
|
||||
nativeMain {
|
||||
|
||||
}
|
||||
nativeTest {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
plugins {
|
||||
kotlin("multiplatform") version "1.3.61"
|
||||
}
|
||||
group = "me.user"
|
||||
version = "1.0-SNAPSHOT"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
kotlin {
|
||||
jvm {
|
||||
compilations.all {
|
||||
kotlinOptions.jvmTarget = "1.8"
|
||||
}
|
||||
}
|
||||
js {
|
||||
browser {
|
||||
|
||||
}
|
||||
}
|
||||
val hostOs = System.getProperty("os.name")
|
||||
val isMingwX64 = hostOs.startsWith("Windows")
|
||||
val nativeTarget = when {
|
||||
hostOs == "Mac OS X" -> macosX64("native")
|
||||
hostOs == "Linux" -> linuxX64("native")
|
||||
isMingwX64 -> mingwX64("native")
|
||||
else -> throw GradleException("Host OS is not supported in Kotlin/Native.")
|
||||
}
|
||||
|
||||
|
||||
sourceSets {
|
||||
val commonMain by getting {
|
||||
dependencies {
|
||||
implementation(kotlin("stdlib-common"))
|
||||
}
|
||||
}
|
||||
val commonTest by getting {
|
||||
dependencies {
|
||||
implementation(kotlin("test-common"))
|
||||
implementation(kotlin("test-annotations-common"))
|
||||
}
|
||||
}
|
||||
val jvmMain by getting {
|
||||
dependencies {
|
||||
implementation(kotlin("stdlib-jdk8"))
|
||||
}
|
||||
}
|
||||
val jvmTest by getting {
|
||||
dependencies {
|
||||
implementation(kotlin("test-junit"))
|
||||
}
|
||||
}
|
||||
val jsMain by getting {
|
||||
dependencies {
|
||||
implementation(kotlin("stdlib-js"))
|
||||
}
|
||||
}
|
||||
val jsTest by getting {
|
||||
dependencies {
|
||||
implementation(kotlin("test-js"))
|
||||
}
|
||||
}
|
||||
val nativeMain by getting
|
||||
val nativeTest by getting
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
rootProject.name = 'MultiplatformLibrary'
|
||||
+1
@@ -0,0 +1 @@
|
||||
rootProject.name = "MultiplatformLibrary"
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTargetWithTests
|
||||
|
||||
plugins {
|
||||
id 'org.jetbrains.kotlin.multiplatform' version '1.3.61'
|
||||
}
|
||||
group = 'me.user'
|
||||
version = '1.0-SNAPSHOT'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
kotlin {
|
||||
def hostOs = System.getProperty("os.name")
|
||||
def isMingwX64 = hostOs.startsWith("Windows")
|
||||
KotlinNativeTargetWithTests nativeTarget
|
||||
if (hostOs == "Mac OS X") nativeTarget = macosX64('native')
|
||||
else if (hostOs == "Linux") nativeTarget = linuxX64("native")
|
||||
else if (isMingwX64) nativeTarget = mingwX64("native")
|
||||
else throw new GradleException("Host OS is not supported in Kotlin/Native.")
|
||||
|
||||
nativeTarget.with {
|
||||
binaries {
|
||||
executable {
|
||||
entryPoint = 'main'
|
||||
}
|
||||
}
|
||||
}
|
||||
sourceSets {
|
||||
nativeMain {
|
||||
|
||||
}
|
||||
nativeTest {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
plugins {
|
||||
kotlin("multiplatform") version "1.3.61"
|
||||
}
|
||||
group = "me.user"
|
||||
version = "1.0-SNAPSHOT"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
kotlin {
|
||||
val hostOs = System.getProperty("os.name")
|
||||
val isMingwX64 = hostOs.startsWith("Windows")
|
||||
val nativeTarget = when {
|
||||
hostOs == "Mac OS X" -> macosX64("native")
|
||||
hostOs == "Linux" -> linuxX64("native")
|
||||
isMingwX64 -> mingwX64("native")
|
||||
else -> throw GradleException("Host OS is not supported in Kotlin/Native.")
|
||||
}
|
||||
|
||||
nativeTarget.apply {
|
||||
binaries {
|
||||
executable {
|
||||
entryPoint = "main"
|
||||
}
|
||||
}
|
||||
}
|
||||
sourceSets {
|
||||
val nativeMain by getting
|
||||
val nativeTest by getting
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
rootProject.name = 'NativeConsoleApplication'
|
||||
+1
@@ -0,0 +1 @@
|
||||
rootProject.name = "NativeConsoleApplication"
|
||||
Reference in New Issue
Block a user