Skip to content

Commit

Permalink
Merge pull request #644 from mikepenz/feature/kotlin2
Browse files Browse the repository at this point in the history
Upgrade to Kotlin 2.x and Compose 1.6.10
  • Loading branch information
mikepenz authored May 30, 2024
2 parents 3e9b608 + ac5ea29 commit 53d1341
Show file tree
Hide file tree
Showing 63 changed files with 131 additions and 149 deletions.
7 changes: 1 addition & 6 deletions .github/ci-gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.workers.max=2
org.gradle.jvmargs=-Xmx6G
org.gradle.caching=true
org.gradle.configureondemand=true
# parallel kapt
kapt.use.worker.api=true
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=2048m
33 changes: 12 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 100

- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
java-package: jdk

- name: Validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
java-version: |
17
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties

- name: Checkout Gradle Build Cache
if: ${{ steps.self_hosted.outputs.FLAG != 'self-hosted' }}
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
!~/.gradle/wrapper/dists/**/gradle*.zip
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
gradle-${{ runner.os }}-
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Validate gradle wrapper
uses: gradle/actions/wrapper-validation@v3

- name: Build Debug
run: ./gradlew clean app:assembleDebug
Expand Down Expand Up @@ -109,14 +100,14 @@ jobs:
find . -name "*.aab" -type f -exec cp {} "artifacts" \;
- name: Archive Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: "App-Artifacts"
path: artifacts/*

- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v1
uses: mikepenz/release-changelog-builder-action@v4
if: startsWith(github.ref, 'refs/tags/')
with:
configuration: ".github/config/configuration.json"
Expand All @@ -125,7 +116,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Release
uses: softprops/action-gh-release@91409e712cf565ce9eff10c87a8d1b11b81757ae
uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87
if: startsWith(github.ref, 'refs/tags/')
with:
body: ${{steps.github_release.outputs.changelog}}
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ proguard/
*.log
functiongraphic.psd

vendor/*
vendor/*
.kotlin
2 changes: 2 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ android {
compileSdkVersion setup.compileSdk
buildToolsVersion setup.buildTools

namespace = "com.mikepenz.iconics.sample"

defaultConfig {
minSdkVersion setup.composeMinSdk
targetSdkVersion setup.targetSdk
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.mikepenz.iconics.sample">
xmlns:tools="http://schemas.android.com/tools">

<application
android:name=".CustomApplication"
Expand Down
21 changes: 11 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,24 @@ buildscript {

ext {
release = [
versionName: "5.5.0-compose01",
versionName: "5.5.0",
versionCode: 50500
]

setup = [
compileSdk : 33,
compileSdk: 34,
buildTools: "34.0.0",
minSdk: 21,
composeMinSdk: 21,
targetSdk : 33
targetSdk : 34
]

versions = [
kotlin : '1.8.22',
kotlin : '2.0.0',
androidX : '1.0.0',
recyclerView : '1.3.0',
material : '1.9.0',
appcompat : '1.6.1',
appcompat : '1.7.0',
drawerlayout : '1.1.0',
constraintLayout: '2.0.4',
cardview : '1.0.0',
Expand All @@ -44,12 +44,11 @@ buildscript {
],
startup : '1.1.1',
detekt : '1.18.1',
aboutLibraries : '10.8.2',
materialDrawer : '9.0.1',
aboutLibraries: '11.2.1',
materialDrawer: '9.0.2',
fastAdapter : '5.7.0',
// compose
compose : '1.4.3',
composeCompiler : '1.4.8'
compose : '1.6.10',
]
}

Expand All @@ -62,8 +61,10 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath 'com.android.tools.build:gradle:8.4.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
classpath "org.jetbrains.kotlin:compose-compiler-gradle-plugin:${versions.kotlin}"
classpath "org.jetbrains.compose:compose-gradle-plugin:${versions.compose}"
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:${versions.detekt}"
classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:${versions.aboutLibraries}"
}
Expand Down
1 change: 1 addition & 0 deletions community-material-typeface-library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ android {
lintOptions {
abortOnError false
}
namespace 'com.mikepenz.iconics.typeface.library.community'
}
if (project.hasProperty('pushall') || project.hasProperty('communitymaterialonly')) {
apply from: '../gradle-release.gradle'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.mikepenz.iconics.typeface.library.community">
xmlns:tools="http://schemas.android.com/tools">

<application>
<provider
Expand Down
1 change: 1 addition & 0 deletions devicon-typeface-library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ android {
lintOptions {
abortOnError false
}
namespace 'com.mikepenz.iconics.typeface.library.devicon'
}
if (project.hasProperty('pushall') || project.hasProperty('DevIcononly')) {
apply from: '../gradle-release.gradle'
Expand Down
3 changes: 1 addition & 2 deletions devicon-typeface-library/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.mikepenz.iconics.typeface.library.devicon">
xmlns:tools="http://schemas.android.com/tools">

<application>
<provider
Expand Down
1 change: 1 addition & 0 deletions entypo-typeface-library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ android {
lintOptions {
abortOnError false
}
namespace 'com.mikepenz.iconics.typeface.library.entypo'
}
if (project.hasProperty('pushall') || project.hasProperty('Entypoonly')) {
apply from: '../gradle-release.gradle'
Expand Down
3 changes: 1 addition & 2 deletions entypo-typeface-library/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.mikepenz.iconics.typeface.library.entypo">
xmlns:tools="http://schemas.android.com/tools">

<application>
<provider
Expand Down
1 change: 1 addition & 0 deletions fontawesome-typeface-library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ android {
lintOptions {
abortOnError false
}
namespace 'com.mikepenz.iconics.typeface.library.fontawesome'
}
if (project.hasProperty('pushall') || project.hasProperty('fontawesomeonly')) {
apply from: '../gradle-release.gradle'
Expand Down
3 changes: 1 addition & 2 deletions fontawesome-typeface-library/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.mikepenz.iconics.typeface.library.fontawesome">
xmlns:tools="http://schemas.android.com/tools">

<application>
<provider
Expand Down
1 change: 1 addition & 0 deletions foundation-icons-typeface-library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ android {
lintOptions {
abortOnError false
}
namespace 'com.mikepenz.iconics.typeface.library.foundationicons'
}
if (project.hasProperty('pushall') || project.hasProperty('FoundationIconsonly')) {
apply from: '../gradle-release.gradle'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.mikepenz.iconics.typeface.library.foundationicons">
xmlns:tools="http://schemas.android.com/tools">

<application>
<provider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ apply from: "../../gradle/compile.groovy"
android {
compileSdkVersion setup.compileSdk
buildToolsVersion setup.buildTools
namespace = "com.mikepenz.iconics.typeface.library.googlematerial"

defaultConfig {
minSdkVersion setup.minSdk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.mikepenz.iconics.typeface.library.googlematerial">
xmlns:tools="http://schemas.android.com/tools">

<application>
<provider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ android {
compileSdkVersion setup.compileSdk
buildToolsVersion setup.buildTools

namespace = "com.mikepenz.iconics.typeface.library.googlematerial.outlined"
defaultConfig {
minSdkVersion setup.minSdk
targetSdkVersion setup.targetSdk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.mikepenz.iconics.typeface.library.googlematerial">
xmlns:tools="http://schemas.android.com/tools">

<application>
<provider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package com.mikepenz.iconics.typeface.library.googlematerial

import com.mikepenz.iconics.typeface.IIcon
import com.mikepenz.iconics.typeface.ITypeface
import com.mikepenz.iconics.typeface.library.googlematerial.outlined.R
import java.util.LinkedList

@Suppress("EnumEntryName")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ apply from: "../../gradle/compile.groovy"
android {
compileSdkVersion setup.compileSdk
buildToolsVersion setup.buildTools
namespace = "com.mikepenz.iconics.typeface.library.googlematerial.rounded"

defaultConfig {
minSdkVersion setup.minSdk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.mikepenz.iconics.typeface.library.googlematerial">
xmlns:tools="http://schemas.android.com/tools">

<application>
<provider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package com.mikepenz.iconics.typeface.library.googlematerial

import com.mikepenz.iconics.typeface.IIcon
import com.mikepenz.iconics.typeface.ITypeface
import com.mikepenz.iconics.typeface.library.googlematerial.rounded.R
import java.util.LinkedList

@Suppress("EnumEntryName")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ apply from: "../../gradle/compile.groovy"
android {
compileSdkVersion setup.compileSdk
buildToolsVersion setup.buildTools
namespace = "com.mikepenz.iconics.typeface.library.googlematerial.sharp"

defaultConfig {
minSdkVersion setup.minSdk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.mikepenz.iconics.typeface.library.googlematerial">
xmlns:tools="http://schemas.android.com/tools">

<application>
<provider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package com.mikepenz.iconics.typeface.library.googlematerial

import com.mikepenz.iconics.typeface.IIcon
import com.mikepenz.iconics.typeface.ITypeface
import com.mikepenz.iconics.typeface.library.googlematerial.sharp.R
import java.util.LinkedList

@Suppress("EnumEntryName")
Expand Down
9 changes: 7 additions & 2 deletions gradle-release.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ afterEvaluate { project ->
}
}

afterEvaluate {
generateMetadataFileForReleasePublication.dependsOn androidSourcesJar
}

publishing {
publications {
release(MavenPublication) {
Expand All @@ -71,7 +75,6 @@ afterEvaluate { project ->
artifactId POM_ARTIFACT_ID
version android.defaultConfig.versionName

artifact androidSourcesJar
artifact androidJavadocsJar

pom.withXml {
Expand All @@ -81,7 +84,9 @@ afterEvaluate { project ->
asNode().children().last() + pomConfig

// we want dependencies as compile, to ensure they are transitively resolved
asNode().dependencies.'*'.findAll() { it.scope.text() == 'runtime' }.each { it.scope*.value = 'compile' }
if (!POM_ARTIFACT_ID.endsWith("-typeface")) {
asNode().dependencies.'*'.findAll() { it.scope.text() == 'runtime' }.each { it.scope*.value = 'compile' }
}
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,7 @@ POM_LICENCE_DIST=repo
POM_DEVELOPER_ID=mikepenz
POM_DEVELOPER_NAME=Mike Penz

android.useAndroidX=true
android.useAndroidX=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
Loading

0 comments on commit 53d1341

Please sign in to comment.