Skip to content
This repository has been archived by the owner on May 7, 2023. It is now read-only.

Commit

Permalink
Merge pull request #2 from ElisaMin/master
Browse files Browse the repository at this point in the history
multiplatform version
  • Loading branch information
Kyant0 authored Sep 10, 2022
2 parents 19998a7 + 05b8c3e commit a0dcdd2
Show file tree
Hide file tree
Showing 63 changed files with 612 additions and 373 deletions.
105 changes: 91 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,92 @@
*.iml
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### Gradle template
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
**/build/
!src/**/build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Cache of project
.gradletasknamecache

# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties


### android sdk ###
local.properties
10 changes: 9 additions & 1 deletion .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 0 additions & 20 deletions .idea/gradle.xml

This file was deleted.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 18 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id("com.android.application") version "7.4.0-alpha10" apply false
id("com.android.library") version "7.4.0-alpha10" apply false
kotlin("android") version "1.7.10" apply false
group = "com.kyant.monet"
version = extra["monet.version"] as String


allprojects {
repositories {
google()
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}
}

plugins {
kotlin("multiplatform") apply false
kotlin("android") apply false
id("com.android.application") apply false
id("com.android.library") apply false
id("org.jetbrains.compose") apply false
}
File renamed without changes.
20 changes: 8 additions & 12 deletions demo/build.gradle.kts → demo-android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,17 @@ plugins {
}

@Suppress("UnstableApiUsage")
group = "com.kyant.monet.demo"
version = extra["monet.version"] as String

android {
namespace = "com.kyant.monetdemo"
compileSdk = 33
buildToolsVersion = "33.0.0"

defaultConfig {
applicationId = "com.kyant.monetdemo"
minSdk = 21
targetSdk = 33
versionCode = 2
versionName = "0.1.0-alpha03"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
versionCode = (extra["monet.versionCode"] as String).toInt()
vectorDrawables {
useSupportLibrary = true
}
Expand Down Expand Up @@ -49,14 +47,12 @@ android {
}

dependencies {
api(project(":demo-common"))
implementation(project(":lib"))
implementation("androidx.core:core-ktx:1.8.0")
implementation("androidx.core:core-ktx:1.9.0")
implementation("androidx.activity:activity-compose:1.5.1")
implementation("androidx.compose.ui:ui:1.3.0-beta02")
implementation("androidx.compose.material3:material3:1.0.0-beta02")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.3")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.0-alpha07")
androidTestImplementation("androidx.compose.ui:ui-test-junit4:1.3.0-beta02")
debugImplementation("androidx.compose.ui:ui-test-manifest:1.3.0-beta02")
}


4 changes: 3 additions & 1 deletion lib/proguard-rules.pro → demo-android/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-renamesourcefileattribute SourceFile
# Add *one* of the following rules to your Proguard configuration file.
# Alternatively, you can annotate classes and class members with @androidx.annotation.Keep
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.viewModels
import androidx.core.view.WindowCompat
import com.kyant.monet.demo.common.App
import com.kyant.monet.demo.common.AppViewModel
import com.kyant.monet.demo.common.MonetTheme

class MainActivity : ComponentActivity() {
private val viewModel: AppViewModel by viewModels()
Expand Down
54 changes: 54 additions & 0 deletions demo-common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
plugins {
kotlin("multiplatform")
id("com.android.library")
id("org.jetbrains.compose")
}

group = "com.kyant.monet.demo"
version = extra["monet.version"] as String

kotlin {
android()
jvm("desktop") {
compilations.all {
kotlinOptions.jvmTarget = "11"
}
}
sourceSets {
val commonMain by getting {
dependencies {
api(project(":lib"))
api(compose.runtime)
api(compose.foundation)
api(compose.material)
@OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class)
api(compose.material3)
}
}
val androidMain by getting {
dependencies {
api(project(":lib"))
api(compose.runtime)
api(compose.foundation)
api(compose.material)
@OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class)
api(compose.material3)
api("androidx.core:core-ktx:1.9.0")
api("androidx.activity:activity-compose:1.5.1")
}
}
}
}

android {
namespace = "com.kyant.monet.demo.common"
compileSdk = 33
defaultConfig {
minSdk = 21
}

lint {
baseline = file("build/lint-baseline.xml")
}
}

Loading

0 comments on commit a0dcdd2

Please sign in to comment.