Skip to content

Commit bb298ee

Browse files
authored
Merge pull request #37 from kotlin-hands-on/new_wizard_jc_starter
New wizard starter
2 parents 1b158cb + fd9096d commit bb298ee

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+862
-878
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[![official JetBrains project](https://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
22
[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0)
33

4+
# Create a multiplatform app using Ktor and SQLDelight – tutorial
45

5-
# Networking and data storage with Kotlin Multiplatform Mobile
6-
7-
This repository is the code corresponding to the hands-on lab [Networking and data storage with Kotlin Multiplatform Mobile](https://play.kotlinlang.org/hands-on/Networking%20and%20Data%20Storage%20with%20Kotlin%20Multiplatfrom%20Mobile/01_Introduction).
6+
This repository is the code corresponding to the hands-on lab [Create a multiplatform app using Ktor and SQLDelight – tutorial](https://www.jetbrains.com/help/kotlin-multiplatform-dev/multiplatform-ktor-sqldelight.html).

androidApp/build.gradle.kts

Lines changed: 0 additions & 35 deletions
This file was deleted.

androidApp/src/main/AndroidManifest.xml

Lines changed: 0 additions & 17 deletions
This file was deleted.

androidApp/src/main/java/com/jetbrains/handson/androidApp/MainActivity.kt

Lines changed: 0 additions & 17 deletions
This file was deleted.

androidApp/src/main/res/layout/activity_main.xml

Lines changed: 0 additions & 21 deletions
This file was deleted.

androidApp/src/main/res/values/colors.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

androidApp/src/main/res/values/styles.xml

Lines changed: 0 additions & 10 deletions
This file was deleted.

build.gradle.kts

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,8 @@
1-
buildscript {
2-
repositories {
3-
gradlePluginPortal()
4-
google()
5-
mavenCentral()
6-
}
7-
dependencies {
8-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21")
9-
classpath("com.android.tools.build:gradle:8.0.2")
10-
}
11-
}
12-
13-
allprojects {
14-
repositories {
15-
google()
16-
mavenCentral()
17-
}
18-
}
19-
20-
tasks.register("clean", Delete::class) {
21-
delete(rootProject.buildDir)
1+
plugins {
2+
// this is necessary to avoid the plugins to be loaded multiple times
3+
// in each subproject's classloader
4+
alias(libs.plugins.androidApplication) apply false
5+
alias(libs.plugins.androidLibrary) apply false
6+
alias(libs.plugins.jetbrainsCompose) apply false
7+
alias(libs.plugins.kotlinMultiplatform) apply false
228
}

composeApp/build.gradle.kts

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
import org.jetbrains.compose.ExperimentalComposeLibrary
2+
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
3+
4+
plugins {
5+
alias(libs.plugins.kotlinMultiplatform)
6+
alias(libs.plugins.androidApplication)
7+
alias(libs.plugins.jetbrainsCompose)
8+
}
9+
10+
kotlin {
11+
androidTarget {
12+
compilations.all {
13+
kotlinOptions {
14+
jvmTarget = "1.8"
15+
}
16+
}
17+
}
18+
19+
sourceSets {
20+
21+
androidMain.dependencies {
22+
implementation(libs.compose.ui.tooling.preview)
23+
implementation(libs.androidx.activity.compose)
24+
}
25+
commonMain.dependencies {
26+
implementation(compose.runtime)
27+
implementation(compose.foundation)
28+
implementation(compose.material)
29+
implementation(compose.ui)
30+
@OptIn(ExperimentalComposeLibrary::class)
31+
implementation(compose.components.resources)
32+
implementation(projects.shared)
33+
}
34+
}
35+
}
36+
37+
android {
38+
namespace = "com.jetbrains.spacetutorial"
39+
compileSdk = libs.versions.android.compileSdk.get().toInt()
40+
41+
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
42+
sourceSets["main"].res.srcDirs("src/androidMain/res")
43+
sourceSets["main"].resources.srcDirs("src/commonMain/resources")
44+
45+
defaultConfig {
46+
applicationId = "com.jetbrains.spacetutorial"
47+
minSdk = libs.versions.android.minSdk.get().toInt()
48+
targetSdk = libs.versions.android.targetSdk.get().toInt()
49+
versionCode = 1
50+
versionName = "1.0"
51+
}
52+
packaging {
53+
resources {
54+
excludes += "/META-INF/{AL2.0,LGPL2.1}"
55+
}
56+
}
57+
buildTypes {
58+
getByName("release") {
59+
isMinifyEnabled = false
60+
}
61+
}
62+
compileOptions {
63+
sourceCompatibility = JavaVersion.VERSION_1_8
64+
targetCompatibility = JavaVersion.VERSION_1_8
65+
}
66+
dependencies {
67+
debugImplementation(libs.compose.ui.tooling)
68+
}
69+
}
70+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
3+
4+
<application
5+
android:allowBackup="true"
6+
android:icon="@mipmap/ic_launcher"
7+
android:label="@string/app_name"
8+
android:roundIcon="@mipmap/ic_launcher_round"
9+
android:supportsRtl="true"
10+
android:theme="@android:style/Theme.Material.Light.NoActionBar">
11+
<activity
12+
android:exported="true"
13+
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden|mnc|colorMode|density|fontScale|fontWeightAdjustment|keyboard|layoutDirection|locale|mcc|navigation|smallestScreenSize|touchscreen|uiMode"
14+
android:name=".MainActivity">
15+
<intent-filter>
16+
<action android:name="android.intent.action.MAIN" />
17+
18+
<category android:name="android.intent.category.LAUNCHER" />
19+
</intent-filter>
20+
</activity>
21+
</application>
22+
23+
</manifest>

0 commit comments

Comments
 (0)