Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade AGP to 8.1.0 #13

Merged
merged 2 commits into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/app-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set up JDK 11
- name: set up JDK 17
uses: actions/setup-java@v2
with:
distribution: adopt
java-version: 11
java-version: 17
- name: Build with Gradle
run: ./gradlew build
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: adopt
java-version: 11
java-version: 17

- name: Publish to MavenCentral
run: ./gradlew countrypicker:publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository
Expand Down
2 changes: 1 addition & 1 deletion .idea/gradle.xml

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

3 changes: 3 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ android {
composeOptions {
kotlinCompilerExtensionVersion compose_compiler_version
}

namespace 'com.canopas.campose.jetcountypicker'

}

dependencies {
Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ buildscript {
ext {
compose_version = '1.4.3'
kotlin_version = '1.8.10'
compose_compiler_version = "1.4.3"
compose_compiler_version = "1.5.0"
}
}
plugins {
id 'com.android.application' version '7.4.0' apply false
id 'com.android.library' version '7.4.0' apply false
id 'org.jetbrains.kotlin.android' version '1.8.10' apply false
id 'com.android.application' version '8.1.0' apply false
id 'com.android.library' version '8.1.0' apply false
id 'org.jetbrains.kotlin.android' version '1.9.0' apply false
id 'io.github.gradle-nexus.publish-plugin' version "1.1.0"
}
apply from: "${rootDir}/scripts/publish-root.gradle"
Expand Down
11 changes: 6 additions & 5 deletions countrypicker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {

ext {
PUBLISH_GROUP_ID = 'com.canopas.jetcountrypicker'
PUBLISH_VERSION = '1.0.5'
PUBLISH_VERSION = '1.0.6'
PUBLISH_ARTIFACT_ID = 'jetcountrypicker'
}
apply from: "${rootDir}/scripts/publish-module.gradle"
Expand All @@ -25,8 +25,8 @@ android {

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
minifyEnabled true
consumerProguardFiles 'proguard-rules.pro'
}
}
compileOptions {
Expand All @@ -42,6 +42,8 @@ android {
composeOptions {
kotlinCompilerExtensionVersion compose_compiler_version
}

namespace 'com.canopas.jetcountrypicker'
}

dependencies {
Expand All @@ -56,6 +58,5 @@ dependencies {
implementation "androidx.compose.material:material:$compose_version"
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
implementation "androidx.compose.material:material-icons-extended:$compose_version"
implementation 'com.google.code.gson:gson:2.10.1'

implementation "com.squareup.moshi:moshi-kotlin:1.15.0"
}
3 changes: 2 additions & 1 deletion countrypicker/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-renamesourcefileattribute SourceFile
-keep class com.canopas.campose.countrypicker.model.**{ *; }
3 changes: 1 addition & 2 deletions countrypicker/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.canopas.campose.countrypicker">
<manifest>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import androidx.compose.ui.text.input.KeyboardType
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.canopas.jetcountrypicker.R

@Composable
fun CountrySearchView(searchValue: String, onSearch: (searchValue: String) -> Unit) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,21 @@ package com.canopas.campose.countrypicker

import android.content.Context
import com.canopas.campose.countrypicker.model.Country
import com.google.gson.Gson
import com.google.gson.reflect.TypeToken
import com.squareup.moshi.JsonAdapter
import com.squareup.moshi.Moshi
import com.squareup.moshi.Types
import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory
import java.io.IOException

fun countryList(context: Context): MutableList<Country> {
val moshi =
Moshi.Builder().add(KotlinJsonAdapterFactory()).build()

val personListType = Types.newParameterizedType(List::class.java, Country::class.java)
val jsonAdapter: JsonAdapter<MutableList<Country>> = moshi.adapter(personListType)

val jsonFileString = getJsonDataFromAsset(context, "Countries.json")
val type = object : TypeToken<List<Country>>() {}.type
return Gson().fromJson(jsonFileString, type)
return jsonAdapter.fromJson(jsonFileString) ?: mutableListOf()
}

fun localeToEmoji(countryCode: String): String {
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Jun 01 18:49:37 IST 2023
#Wed Aug 02 17:30:03 IST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading