diff --git a/.github/ci-gradle.properties b/.github/ci-gradle.properties index 98c100bf..e716081b 100644 --- a/.github/ci-gradle.properties +++ b/.github/ci-gradle.properties @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4739582e..e467121a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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" @@ -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}} diff --git a/.gitignore b/.gitignore index 31d20cc0..9810628b 100644 --- a/.gitignore +++ b/.gitignore @@ -29,4 +29,5 @@ proguard/ *.log functiongraphic.psd -vendor/* \ No newline at end of file +vendor/* +.kotlin \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index a80e14b6..818a7f0c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -28,6 +28,8 @@ android { compileSdkVersion setup.compileSdk buildToolsVersion setup.buildTools + namespace = "com.mikepenz.iconics.sample" + defaultConfig { minSdkVersion setup.composeMinSdk targetSdkVersion setup.targetSdk diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index d3d3097c..88c423c5 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -16,8 +16,7 @@ + xmlns:tools="http://schemas.android.com/tools"> + xmlns:tools="http://schemas.android.com/tools"> + xmlns:tools="http://schemas.android.com/tools"> + xmlns:tools="http://schemas.android.com/tools"> + xmlns:tools="http://schemas.android.com/tools"> + xmlns:tools="http://schemas.android.com/tools"> + xmlns:tools="http://schemas.android.com/tools"> + xmlns:tools="http://schemas.android.com/tools"> + xmlns:tools="http://schemas.android.com/tools"> + xmlns:tools="http://schemas.android.com/tools"> } } + afterEvaluate { + generateMetadataFileForReleasePublication.dependsOn androidSourcesJar + } + publishing { publications { release(MavenPublication) { @@ -71,7 +75,6 @@ afterEvaluate { project -> artifactId POM_ARTIFACT_ID version android.defaultConfig.versionName - artifact androidSourcesJar artifact androidJavadocsJar pom.withXml { @@ -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' } + } } } } diff --git a/gradle.properties b/gradle.properties index b75c30fd..b2c4ad0c 100755 --- a/gradle.properties +++ b/gradle.properties @@ -34,4 +34,7 @@ POM_LICENCE_DIST=repo POM_DEVELOPER_ID=mikepenz POM_DEVELOPER_NAME=Mike Penz -android.useAndroidX=true \ No newline at end of file +android.useAndroidX=true +android.defaults.buildfeatures.buildconfig=true +android.nonTransitiveRClass=false +android.nonFinalResIds=false \ No newline at end of file diff --git a/gradle/compile.groovy b/gradle/compile.groovy index 1949ec0a..bf80d522 100644 --- a/gradle/compile.groovy +++ b/gradle/compile.groovy @@ -2,36 +2,32 @@ apply plugin: "kotlin-android" android { compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 kotlinOptions { - jvmTarget = "11" - apiVersion = "1.8" - languageVersion = "1.8" + jvmTarget = "17" } } java { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } kotlinOptions { - jvmTarget = "11" - apiVersion = "1.8" - languageVersion = "1.8" + jvmTarget = "17" } } java { toolchain { - languageVersion = JavaLanguageVersion.of(11) + languageVersion = JavaLanguageVersion.of(17) } } kotlin { jvmToolchain { - languageVersion = JavaLanguageVersion.of(11) + languageVersion = JavaLanguageVersion.of(17) } } \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 033e24c4..e6441136 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index c747538f..b82aa23a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index fcb6fca1..1aa94a42 100755 --- a/gradlew +++ b/gradlew @@ -83,7 +83,8 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -144,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -152,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -201,11 +202,11 @@ fi # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ diff --git a/gradlew.bat b/gradlew.bat index 6689b85b..7101f8e4 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail diff --git a/iconics-compose/build.gradle b/iconics-compose/build.gradle index 6fe3cc4f..e313a1ce 100644 --- a/iconics-compose/build.gradle +++ b/iconics-compose/build.gradle @@ -16,6 +16,8 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' +apply plugin: "org.jetbrains.compose" +apply plugin: "org.jetbrains.kotlin.plugin.compose" apply from: "../gradle/compile.groovy" version release.versionName @@ -23,6 +25,7 @@ version release.versionName android { compileSdkVersion setup.compileSdk buildToolsVersion setup.buildTools + namespace 'com.mikepenz.iconics.compose' defaultConfig { minSdkVersion setup.composeMinSdk @@ -38,14 +41,6 @@ android { } } - buildFeatures { - compose true - } - - composeOptions { - kotlinCompilerExtensionVersion versions.composeCompiler - } - kotlinOptions { // specify the artifactId as module-name for kotlin freeCompilerArgs += ["-module-name", POM_ARTIFACT_ID] @@ -74,6 +69,6 @@ if (project.hasProperty('pushall') || project.hasProperty('librarycomposeonly')) dependencies { api project(':iconics-typeface-api') - implementation "androidx.compose.ui:ui:${versions.compose}" - implementation "androidx.compose.foundation:foundation:${versions.compose}" + implementation(compose.ui) + implementation(compose.foundation) } diff --git a/iconics-compose/src/main/AndroidManifest.xml b/iconics-compose/src/main/AndroidManifest.xml index 81763e68..469c5980 100644 --- a/iconics-compose/src/main/AndroidManifest.xml +++ b/iconics-compose/src/main/AndroidManifest.xml @@ -13,4 +13,4 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - \ No newline at end of file + \ No newline at end of file diff --git a/iconics-core/build.gradle b/iconics-core/build.gradle index ce7847ec..a2424ba8 100644 --- a/iconics-core/build.gradle +++ b/iconics-core/build.gradle @@ -16,6 +16,8 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' +apply plugin: "org.jetbrains.compose" +apply plugin: "org.jetbrains.kotlin.plugin.compose" apply from: "../gradle/compile.groovy" version release.versionName @@ -23,6 +25,7 @@ version release.versionName android { compileSdkVersion setup.compileSdk buildToolsVersion setup.buildTools + namespace 'com.mikepenz.iconics.core' defaultConfig { minSdkVersion setup.minSdk @@ -49,20 +52,12 @@ android { // specify the artifactId as module-name for kotlin freeCompilerArgs += ["-module-name", POM_ARTIFACT_ID] } - - buildFeatures { - compose true - } - - composeOptions { - kotlinCompilerExtensionVersion versions.composeCompiler - } } dependencies { api project(':iconics-typeface-api') implementation "androidx.appcompat:appcompat:$versions.appcompat" - implementation "androidx.compose.runtime:runtime:${versions.compose}" + implementation(compose.runtime) } if (project.hasProperty('pushall') || project.hasProperty('librarycoreonly')) { diff --git a/iconics-core/src/main/AndroidManifest.xml b/iconics-core/src/main/AndroidManifest.xml index 3bca9406..305a8b1f 100644 --- a/iconics-core/src/main/AndroidManifest.xml +++ b/iconics-core/src/main/AndroidManifest.xml @@ -15,8 +15,7 @@ --> + xmlns:tools="http://schemas.android.com/tools"> - + diff --git a/iconics-views/build.gradle b/iconics-views/build.gradle index 340b1dca..d9395529 100644 --- a/iconics-views/build.gradle +++ b/iconics-views/build.gradle @@ -41,6 +41,7 @@ android { lintOptions { abortOnError false } + namespace 'com.mikepenz.iconics.view' // specify the artifactId as module-name for kotlin kotlinOptions.freeCompilerArgs += ["-module-name", POM_ARTIFACT_ID] diff --git a/iconics-views/src/main/AndroidManifest.xml b/iconics-views/src/main/AndroidManifest.xml index 2c670de5..fb63d2da 100644 --- a/iconics-views/src/main/AndroidManifest.xml +++ b/iconics-views/src/main/AndroidManifest.xml @@ -15,4 +15,4 @@ ~ limitations under the License. --> - + diff --git a/ionicons-typeface-library/build.gradle b/ionicons-typeface-library/build.gradle index 8d525f56..c1fee471 100644 --- a/ionicons-typeface-library/build.gradle +++ b/ionicons-typeface-library/build.gradle @@ -41,6 +41,7 @@ android { lintOptions { abortOnError false } + namespace 'com.mikepenz.iconics.typeface.library.ionicons' } if (project.hasProperty('pushall') || project.hasProperty('Ioniconsonly')) { apply from: '../gradle-release.gradle' diff --git a/ionicons-typeface-library/src/main/AndroidManifest.xml b/ionicons-typeface-library/src/main/AndroidManifest.xml index 9bca1dd3..319a716d 100644 --- a/ionicons-typeface-library/src/main/AndroidManifest.xml +++ b/ionicons-typeface-library/src/main/AndroidManifest.xml @@ -16,8 +16,7 @@ + xmlns:tools="http://schemas.android.com/tools"> + xmlns:tools="http://schemas.android.com/tools"> + xmlns:tools="http://schemas.android.com/tools"> + xmlns:tools="http://schemas.android.com/tools"> + xmlns:tools="http://schemas.android.com/tools"> + xmlns:tools="http://schemas.android.com/tools"> + xmlns:tools="http://schemas.android.com/tools"> + xmlns:tools="http://schemas.android.com/tools"> + xmlns:tools="http://schemas.android.com/tools"> + xmlns:tools="http://schemas.android.com/tools">