-
Notifications
You must be signed in to change notification settings - Fork 529
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'remove_desugar' into compose_1.7
- Loading branch information
Showing
23 changed files
with
314 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
name: Publish Snapshot | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ LazyRow/LazyColumn for compose. | |
|
||
[](https://github.com/kizitonwose/Calendar/actions) | ||
[[not(contains(text(),%27-%27))][last()])](https://repo1.maven.org/maven2/com/kizitonwose/calendar/) | ||
[[contains(text(),%27beta%27)][last()])](https://repo1.maven.org/maven2/com/kizitonwose/calendar/) | ||
[](https://github.com/kizitonwose/Calendar/blob/main/LICENSE.md) | ||
[](https://twitter.com/kizitonwose) | ||
|
||
|
@@ -45,15 +46,13 @@ View the sample app's source code [here](https://github.com/kizitonwose/Calendar | |
|
||
## Setup | ||
|
||
The library uses `java.time` classes via [Java 8+ API desugaring](https://developer.android.com/studio/write/java8-support#library-desugaring) for backward compatibility since these classes were added in Java 8. | ||
|
||
#### Step 1 | ||
|
||
This step is required ONLY if your app's `minSdkVersion` is below 26. Jump to [step 2](#step-2) if this does not apply to you. | ||
**This step is required ONLY if your app's `minSdkVersion` is below 26. Jump to [step 2](#step-2) if this does not apply to you.** | ||
|
||
To set up your project for desugaring, you need to first ensure that you are using [Android Gradle plugin](https://developer.android.com/studio/releases/gradle-plugin#updating-plugin) 4.0.0 or higher. | ||
Apps with `minSdkVersion` below 26 have to enable [Java 8+ API desugaring](https://developer.android.com/studio/write/java8-support#library-desugaring) for backward compatibility since `java.time` classes were added in Java 8 which is supported natively starting from Android SDK 26. To set up your project for desugaring, you need to first ensure that you are using [Android Gradle plugin](https://developer.android.com/studio/releases/gradle-plugin#updating-plugin) 4.0.0 or higher. | ||
|
||
Then include the following in your app's build.gradle file: | ||
Then include the following in your app's `build.gradle` file: | ||
|
||
```groovy | ||
android { | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import com.kizitonwose.calendar.buildsrc.Plugins | ||
|
||
plugins { | ||
with(com.kizitonwose.calendar.buildsrc.Plugins) { | ||
applyRootPlugins() | ||
} | ||
} | ||
|
||
allprojects { | ||
apply(plugin = Plugins.kotlinter) | ||
} | ||
|
||
tasks.register<Delete>("clean").configure { | ||
delete(rootProject.layout.buildDirectory) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import com.kizitonwose.calendar.buildsrc.Android | ||
import com.kizitonwose.calendar.buildsrc.Config | ||
import com.kizitonwose.calendar.buildsrc.Kotlin | ||
import com.kizitonwose.calendar.buildsrc.Libs | ||
|
||
plugins { | ||
with(com.kizitonwose.calendar.buildsrc.Plugins) { | ||
id(androidLibrary) | ||
id(kotlinAndroid) | ||
id(mavenPublish) | ||
} | ||
} | ||
|
||
android { | ||
compileSdk = Android.compileSdk | ||
namespace = "com.kizitonwose.calendar.compose" | ||
defaultConfig { | ||
minSdk = Android.minSdkComposeLibrary | ||
} | ||
java { | ||
toolchain { | ||
languageVersion.set(Config.compatibleJavaLanguageVersion) | ||
} | ||
} | ||
kotlin { | ||
jvmToolchain { | ||
languageVersion.set(Config.compatibleJavaLanguageVersion) | ||
} | ||
} | ||
buildFeatures { | ||
compose = true | ||
} | ||
composeOptions { | ||
kotlinCompilerExtensionVersion = Android.composeCompiler | ||
} | ||
} | ||
|
||
dependencies { | ||
api(project(":core")) | ||
implementation(project(":data")) | ||
implementation(Kotlin.stdLib) | ||
|
||
implementation(Libs.Compose.ui) | ||
implementation(Libs.Compose.tooling) | ||
implementation(Libs.Compose.foundation) | ||
|
||
testImplementation(Libs.Core.Test.junit) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import com.kizitonwose.calendar.buildsrc.Config | ||
import com.kizitonwose.calendar.buildsrc.Libs | ||
|
||
plugins { | ||
with(com.kizitonwose.calendar.buildsrc.Plugins) { | ||
id(kotlinJvm) | ||
id(mavenPublish) | ||
} | ||
} | ||
|
||
java { | ||
toolchain { | ||
languageVersion.set(Config.compatibleJavaLanguageVersion) | ||
} | ||
} | ||
|
||
kotlin { | ||
jvmToolchain { | ||
languageVersion.set(Config.compatibleJavaLanguageVersion) | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation(Libs.Compose.runtime) // Only needed for @Immutable annotation. | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.