Skip to content

Commit

Permalink
Merge pull request #2 from iGenius-Srl/develop
Browse files Browse the repository at this point in the history
M1 build support
  • Loading branch information
luigivitelli23 authored Dec 22, 2022
2 parents 4f3e970 + 441ac31 commit 3622d4c
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 31 deletions.
1 change: 0 additions & 1 deletion .idea/gradle.xml

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

21 changes: 11 additions & 10 deletions androidstories-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ plugins {
}

android {
compileSdk 31
compileSdk 33

defaultConfig {
minSdk 21
targetSdk 31
targetSdk 33

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
Expand All @@ -30,22 +30,23 @@ android {
buildFeatures {
viewBinding true
}
namespace 'com.igenius.androidstories.app'
}

dependencies {
def lifecycle_version = '2.4.0'
def lifecycle_version = '2.5.1'

implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
implementation 'androidx.fragment:fragment-ktx:1.4.0'
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'com.google.android.material:material:1.7.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.fragment:fragment-ktx:1.5.5'
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"

implementation project(path: ':androidstories')

testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
}
3 changes: 1 addition & 2 deletions androidstories-app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.igenius.androidstories.app">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application>
<activity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class StoryDetailsFragment : Fragment() {
}

inflateMenu(R.menu.story_details_fragment_menu)
menu.findItem(R.id.variants_item).subMenu.run {
menu.findItem(R.id.variants_item).subMenu?.run {
story.variants.forEach { variant ->
add(variant).isCheckable = true
}
Expand Down Expand Up @@ -134,7 +134,7 @@ class StoryDetailsFragment : Fragment() {
private fun selectVariant(variant: String) {
binding?.toolbar?.menu?.findItem(R.id.variants_item)?.run {
title = variant
subMenu.forEach {
subMenu?.forEach {
it.isChecked = it.title == variant
}
}
Expand Down
2 changes: 1 addition & 1 deletion androidstories-processor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ java {

dependencies {
implementation project(':androidstories')
implementation 'com.squareup:kotlinpoet:1.10.1'
implementation 'com.squareup:kotlinpoet:1.10.2'
implementation 'com.google.auto.service:auto-service:1.0.1'
kapt "com.google.auto.service:auto-service:1.0.1"
}
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31"
classpath 'com.android.tools.build:gradle:7.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
19 changes: 10 additions & 9 deletions example-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ plugins {
}

android {
compileSdk 31
compileSdk 33

defaultConfig {
applicationId "com.igenius.androidstories.exampleapp"
minSdk 21
targetSdk 31
targetSdk 33
versionCode 1
versionName "1.0"

Expand All @@ -33,18 +33,19 @@ android {
buildFeatures {
viewBinding true
}
namespace 'com.igenius.androidstories.exampleapp'
}

dependencies {

implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
implementation 'androidx.fragment:fragment-ktx:1.3.6'
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'com.google.android.material:material:1.7.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.fragment:fragment-ktx:1.5.5'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'

//Android stories
implementation project(':androidstories-app')
Expand Down
3 changes: 1 addition & 2 deletions example-app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.igenius.androidstories.exampleapp">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:name=".ExampleStoriesApp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class AsyncExampleFragment: AsyncStoryFragment<Test>() {
variants = ["Red", "Blue"],
)
@AsyncVariant(AsyncExampleFragmentProvider::class)
val async_layout_story = AsyncLayoutStory<Test>(R.layout.button_story) { variant, data ->
val async_layout_story = AsyncLayoutStory<Test>(R.layout.button_story) { _, data ->
findViewById<Button>(R.id.button)?.setBackgroundColorRes(
when (data.foo) {
"Red" -> android.R.color.holo_red_light
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Oct 07 18:09:54 CEST 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

0 comments on commit 3622d4c

Please sign in to comment.