Wizard: remove unneeded project templates & rearrange others

This commit is contained in:
Ilya Kirillov
2020-03-24 23:46:28 +03:00
parent 670a98c8bf
commit 1504e607f9
14 changed files with 209 additions and 87 deletions
@@ -13,6 +13,7 @@ repositories {
mavenCentral()
}
dependencies {
implementation project(':shared')
implementation 'androidx.core:core-ktx:1.1.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
@@ -21,7 +22,7 @@ dependencies {
android {
compileSdkVersion 29
defaultConfig {
applicationId 'me.user.app'
applicationId 'me.user.androidApp'
minSdkVersion 24
targetSdkVersion 29
versionCode 1
@@ -13,6 +13,7 @@ repositories {
mavenCentral()
}
dependencies {
implementation(project(":shared"))
implementation("androidx.core:core-ktx:1.1.0")
implementation("androidx.appcompat:appcompat:1.1.0")
implementation("androidx.constraintlayout:constraintlayout:1.1.3")
@@ -21,7 +22,7 @@ dependencies {
android {
compileSdkVersion(29)
defaultConfig {
applicationId = "me.user.app"
applicationId = "me.user.androidApp"
minSdkVersion(24)
targetSdkVersion(29)
versionCode = 1
@@ -12,7 +12,9 @@ pluginManagement {
}
}
}
rootProject.name = 'AndroidApplication'
rootProject.name = 'MPPMobileApplication'
include(':app')
include(':shared')
include(':androidApp')
@@ -12,7 +12,9 @@ pluginManagement {
}
}
}
rootProject.name = "AndroidApplication"
rootProject.name = "MPPMobileApplication"
include(":app")
include(":shared")
include(":androidApp")
@@ -0,0 +1,79 @@
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
plugins {
id 'org.jetbrains.kotlin.multiplatform' version '1.3.70'
id 'com.android.library'
id 'kotlin-android-extensions'
}
group = 'me.user'
version = '1.0-SNAPSHOT'
repositories {
gradlePluginPortal()
google()
jcenter()
mavenCentral()
}
kotlin {
android()
iosX64('ios') {
binaries {
framework {
baseName = 'shared'
}
}
}
sourceSets {
commonMain {
dependencies {
implementation kotlin('stdlib-common')
}
}
commonTest {
dependencies {
implementation kotlin('test-common')
implementation kotlin('test-annotations-common')
}
}
androidMain {
dependencies {
implementation kotlin('stdlib-jdk7')
implementation 'androidx.core:core-ktx:1.1.0'
}
}
androidTest {
}
iosMain {
}
iosTest {
}
}
}
android {
compileSdkVersion 29
defaultConfig {
minSdkVersion 24
targetSdkVersion 29
versionCode 1
versionName '1.0'
}
buildTypes {
'release' {
minifyEnabled false
}
}
}
task(packForXcode, type: Sync) {
group = 'build'
def mode = System.getenv('CONFIGURATION') ?: 'DEBUG'
def framework = kotlin.targets.ios.binaries.getFramework(mode)
inputs.property('mode', mode)
dependsOn(framework.linkTask)
def targetDir = new File(buildDir, 'xcode-frameworks')
from({ framework.outputDirectory })
into(targetDir)
}
tasks.getByName("build").dependsOn(packForXcode)
@@ -0,0 +1,73 @@
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
plugins {
kotlin("multiplatform") version "1.3.70"
id("com.android.library")
id("kotlin-android-extensions")
}
group = "me.user"
version = "1.0-SNAPSHOT"
repositories {
gradlePluginPortal()
google()
jcenter()
mavenCentral()
}
kotlin {
android()
iosX64("ios") {
binaries {
framework {
baseName = "shared"
}
}
}
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 androidMain by getting {
dependencies {
implementation(kotlin("stdlib-jdk7"))
implementation("androidx.core:core-ktx:1.1.0")
}
}
val androidTest by getting
val iosMain by getting
val iosTest by getting
}
}
android {
compileSdkVersion(29)
defaultConfig {
minSdkVersion(24)
targetSdkVersion(29)
versionCode = 1
versionName = "1.0"
}
buildTypes {
getByName("release") {
isMinifyEnabled = false
}
}
}
val packForXcode by tasks.creating(Sync::class) {
group = "build"
val mode = System.getenv("CONFIGURATION") ?: "DEBUG"
val framework = kotlin.targets.getByName<KotlinNativeTarget>("ios").binaries.getFramework(mode)
inputs.property("mode", mode)
dependsOn(framework.linkTask)
val targetDir = File(buildDir, "xcode-frameworks")
from({ framework.outputDirectory })
into(targetDir)
}
tasks.getByName("build").dependsOn(packForXcode)
@@ -1,6 +1,6 @@
plugins {
id 'org.jetbrains.kotlin.multiplatform' version '1.3.70'
id 'com.android.application'
id 'com.android.library'
id 'kotlin-android-extensions'
}
group = 'me.user'
@@ -14,7 +14,13 @@ repositories {
}
kotlin {
android()
iosX64('ios')
iosX64('ios') {
binaries {
framework {
baseName = 'library'
}
}
}
sourceSets {
commonMain {
dependencies {
@@ -47,7 +53,6 @@ kotlin {
android {
compileSdkVersion 29
defaultConfig {
applicationId 'me.user.android'
minSdkVersion 24
targetSdkVersion 29
versionCode 1
@@ -1,6 +1,6 @@
plugins {
kotlin("multiplatform") version "1.3.70"
id("com.android.application")
id("com.android.library")
id("kotlin-android-extensions")
}
group = "me.user"
@@ -14,7 +14,13 @@ repositories {
}
kotlin {
android()
iosX64("ios")
iosX64("ios") {
binaries {
framework {
baseName = "library"
}
}
}
sourceSets {
val commonMain by getting {
dependencies {
@@ -41,7 +47,6 @@ kotlin {
android {
compileSdkVersion(29)
defaultConfig {
applicationId = "me.user.android"
minSdkVersion(24)
targetSdkVersion(29)
versionCode = 1