Skip to content

Commit

Permalink
Setup buildSrc
Browse files Browse the repository at this point in the history
  • Loading branch information
cl3m committed Jan 10, 2021
1 parent 053ea7a commit 063243f
Show file tree
Hide file tree
Showing 24 changed files with 208 additions and 236 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ test/build
androidApp/build
build
modules.xml
.idea
3 changes: 0 additions & 3 deletions .idea/.gitignore

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

35 changes: 15 additions & 20 deletions androidApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@ plugins {
kotlin("android")
}

val composeVersion:String by project

android {
compileSdkVersion(29)
compileSdkVersion(AndroidSdk.compile)
defaultConfig {
applicationId = "com.rouge41.kmm.compose.androidApp"
minSdkVersion(24)
targetSdkVersion(29)
minSdkVersion(AndroidSdk.min)
targetSdkVersion(AndroidSdk.target)
versionCode = 1
versionName = "1.0"
}
Expand All @@ -31,25 +29,22 @@ android {
compose = true
}
composeOptions {
kotlinCompilerVersion = "1.4.21"
kotlinCompilerExtensionVersion = composeVersion
kotlinCompilerVersion = Version.kotlin
kotlinCompilerExtensionVersion = Version.compose
}
}

dependencies {
implementation(project(":test"))
implementation(Android.appcompact)
implementation(Android.material)

implementation(project(":multiplatform-compose"))
implementation("com.google.android.material:material:1.2.1")
implementation("androidx.appcompat:appcompat:1.2.0")
implementation("androidx.constraintlayout:constraintlayout:2.0.2")
implementation(project(":test"))

// Compose
implementation("androidx.compose.runtime:runtime:$composeVersion")
implementation("androidx.compose.ui:ui:$composeVersion")
implementation("androidx.compose.foundation:foundation:$composeVersion")
implementation("androidx.compose.foundation:foundation-layout:$composeVersion")
implementation("androidx.compose.material:material:$composeVersion")
implementation("androidx.compose.runtime:runtime-livedata:$composeVersion")
//implementation("androidx.ui:ui-tooling:$composeVersion")
implementation("com.google.android.material:compose-theme-adapter:$composeVersion")
implementation(Compose.runtime)
implementation(Compose.ui)
implementation(Compose.foundationLayout)
implementation(Compose.material)
implementation(Compose.runtimeLiveData)
implementation(Compose.navigation)
}
4 changes: 2 additions & 2 deletions androidApp/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
Expand All @@ -13,4 +13,4 @@
android:layout_width="match_parent"
android:layout_height="match_parent"/>

</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
1 change: 1 addition & 0 deletions buildSrc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build
11 changes: 11 additions & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
repositories {
jcenter()
}

plugins {
`kotlin-dsl`
}

kotlinDslPluginOptions {
experimentalWarning.set(false)
}
39 changes: 39 additions & 0 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

object Version {
const val kotlin = "1.4.21"

const val appcompat = "1.2.0"
const val material = "1.2.1"

const val compose = "1.0.0-alpha09"
const val nav_compose = "1.0.0-alpha04"

const val yoga = "~> 1.7"

const val junit = "4.13"
}


object AndroidSdk {
const val min = 24
const val compile = 29
const val target = compile
}

object iOSSdk {
const val deploymentTarget = "9.0"
}

object Android {
const val appcompact = "androidx.appcompat:appcompat:${Version.appcompat}"
const val material = "com.google.android.material:material:${Version.material}"
}

object Compose {
const val runtime = "androidx.compose.runtime:runtime:${Version.compose}"
const val ui = "androidx.compose.ui:ui:${Version.compose}"
const val foundationLayout = "androidx.compose.foundation:foundation-layout:${Version.compose}"
const val material = "androidx.compose.material:material:${Version.compose}"
const val runtimeLiveData = "androidx.compose.runtime:runtime-livedata:${Version.compose}"
const val navigation = "androidx.navigation:navigation-compose:${Version.nav_compose}"
}
3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ kotlin.code.style=official
xcodeproj=./iosApp
android.useAndroidX=true
kotlin.mpp.enableGranularSourceSetsMetadata=true
kotlin.native.enableDependencyPropagation=false
composeVersion=1.0.0-alpha09
kotlin.native.enableDependencyPropagation=false
2 changes: 1 addition & 1 deletion iosApp/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ EXTERNAL SOURCES:
:path: "../test"

SPEC CHECKSUMS:
test: 674c3bf082d75a388f275aff3081f2df63a2abb2
test: b76f6c4e9103aacb0cb567fa165a9ba77f2250fb
Yoga: cff67a400f6b74dc38eb0bad4f156673d9aa980c
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

Expand Down
2 changes: 1 addition & 1 deletion iosApp/Pods/Local Podspecs/test.podspec.json

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

2 changes: 1 addition & 1 deletion iosApp/Pods/Manifest.lock

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

Loading

0 comments on commit 063243f

Please sign in to comment.