From 6baa50fdbdadbe1a72a6e17acd9445db0e4cc00b Mon Sep 17 00:00:00 2001 From: Luis Henrique <65178969+Louiixx-h@users.noreply.github.com> Date: Fri, 6 Oct 2023 18:13:03 -0300 Subject: [PATCH 01/30] chore: java folder renamed for kotlin --- .../main/{java => kotlin}/com/luishenrique/cutecatsgallery/App.kt | 0 .../com/luishenrique/cutecatsgallery/di/AppModule.kt | 0 .../com/luishenrique/cutecatsgallery/ui/adapter/HomeAdapter.kt | 0 .../com/luishenrique/cutecatsgallery/ui/view/HomeActivity.kt | 0 .../luishenrique/cutecatsgallery/ui/viewmodel/HomeViewModel.kt | 0 .../main/{java => kotlin}/com/luishenrique/domain/ApiService.kt | 0 .../main/{java => kotlin}/com/luishenrique/domain/di/AppModule.kt | 0 .../{java => kotlin}/com/luishenrique/domain/entity/Gallery.kt | 0 .../{java => kotlin}/com/luishenrique/domain/handle/Result.kt | 0 .../com/luishenrique/domain/repository/GalleryRepository.kt | 0 .../com/luishenrique/domain/repository/GalleryRepositoryImpl.kt | 0 .../com/luishenrique/domain/usecase/GalleryUseCase.kt | 0 .../com/luishenrique/domain/usecase/GalleryUseCaseImpl.kt | 0 13 files changed, 0 insertions(+), 0 deletions(-) rename app/src/main/{java => kotlin}/com/luishenrique/cutecatsgallery/App.kt (100%) rename app/src/main/{java => kotlin}/com/luishenrique/cutecatsgallery/di/AppModule.kt (100%) rename app/src/main/{java => kotlin}/com/luishenrique/cutecatsgallery/ui/adapter/HomeAdapter.kt (100%) rename app/src/main/{java => kotlin}/com/luishenrique/cutecatsgallery/ui/view/HomeActivity.kt (100%) rename app/src/main/{java => kotlin}/com/luishenrique/cutecatsgallery/ui/viewmodel/HomeViewModel.kt (100%) rename domain/src/main/{java => kotlin}/com/luishenrique/domain/ApiService.kt (100%) rename domain/src/main/{java => kotlin}/com/luishenrique/domain/di/AppModule.kt (100%) rename domain/src/main/{java => kotlin}/com/luishenrique/domain/entity/Gallery.kt (100%) rename domain/src/main/{java => kotlin}/com/luishenrique/domain/handle/Result.kt (100%) rename domain/src/main/{java => kotlin}/com/luishenrique/domain/repository/GalleryRepository.kt (100%) rename domain/src/main/{java => kotlin}/com/luishenrique/domain/repository/GalleryRepositoryImpl.kt (100%) rename domain/src/main/{java => kotlin}/com/luishenrique/domain/usecase/GalleryUseCase.kt (100%) rename domain/src/main/{java => kotlin}/com/luishenrique/domain/usecase/GalleryUseCaseImpl.kt (100%) diff --git a/app/src/main/java/com/luishenrique/cutecatsgallery/App.kt b/app/src/main/kotlin/com/luishenrique/cutecatsgallery/App.kt similarity index 100% rename from app/src/main/java/com/luishenrique/cutecatsgallery/App.kt rename to app/src/main/kotlin/com/luishenrique/cutecatsgallery/App.kt diff --git a/app/src/main/java/com/luishenrique/cutecatsgallery/di/AppModule.kt b/app/src/main/kotlin/com/luishenrique/cutecatsgallery/di/AppModule.kt similarity index 100% rename from app/src/main/java/com/luishenrique/cutecatsgallery/di/AppModule.kt rename to app/src/main/kotlin/com/luishenrique/cutecatsgallery/di/AppModule.kt diff --git a/app/src/main/java/com/luishenrique/cutecatsgallery/ui/adapter/HomeAdapter.kt b/app/src/main/kotlin/com/luishenrique/cutecatsgallery/ui/adapter/HomeAdapter.kt similarity index 100% rename from app/src/main/java/com/luishenrique/cutecatsgallery/ui/adapter/HomeAdapter.kt rename to app/src/main/kotlin/com/luishenrique/cutecatsgallery/ui/adapter/HomeAdapter.kt diff --git a/app/src/main/java/com/luishenrique/cutecatsgallery/ui/view/HomeActivity.kt b/app/src/main/kotlin/com/luishenrique/cutecatsgallery/ui/view/HomeActivity.kt similarity index 100% rename from app/src/main/java/com/luishenrique/cutecatsgallery/ui/view/HomeActivity.kt rename to app/src/main/kotlin/com/luishenrique/cutecatsgallery/ui/view/HomeActivity.kt diff --git a/app/src/main/java/com/luishenrique/cutecatsgallery/ui/viewmodel/HomeViewModel.kt b/app/src/main/kotlin/com/luishenrique/cutecatsgallery/ui/viewmodel/HomeViewModel.kt similarity index 100% rename from app/src/main/java/com/luishenrique/cutecatsgallery/ui/viewmodel/HomeViewModel.kt rename to app/src/main/kotlin/com/luishenrique/cutecatsgallery/ui/viewmodel/HomeViewModel.kt diff --git a/domain/src/main/java/com/luishenrique/domain/ApiService.kt b/domain/src/main/kotlin/com/luishenrique/domain/ApiService.kt similarity index 100% rename from domain/src/main/java/com/luishenrique/domain/ApiService.kt rename to domain/src/main/kotlin/com/luishenrique/domain/ApiService.kt diff --git a/domain/src/main/java/com/luishenrique/domain/di/AppModule.kt b/domain/src/main/kotlin/com/luishenrique/domain/di/AppModule.kt similarity index 100% rename from domain/src/main/java/com/luishenrique/domain/di/AppModule.kt rename to domain/src/main/kotlin/com/luishenrique/domain/di/AppModule.kt diff --git a/domain/src/main/java/com/luishenrique/domain/entity/Gallery.kt b/domain/src/main/kotlin/com/luishenrique/domain/entity/Gallery.kt similarity index 100% rename from domain/src/main/java/com/luishenrique/domain/entity/Gallery.kt rename to domain/src/main/kotlin/com/luishenrique/domain/entity/Gallery.kt diff --git a/domain/src/main/java/com/luishenrique/domain/handle/Result.kt b/domain/src/main/kotlin/com/luishenrique/domain/handle/Result.kt similarity index 100% rename from domain/src/main/java/com/luishenrique/domain/handle/Result.kt rename to domain/src/main/kotlin/com/luishenrique/domain/handle/Result.kt diff --git a/domain/src/main/java/com/luishenrique/domain/repository/GalleryRepository.kt b/domain/src/main/kotlin/com/luishenrique/domain/repository/GalleryRepository.kt similarity index 100% rename from domain/src/main/java/com/luishenrique/domain/repository/GalleryRepository.kt rename to domain/src/main/kotlin/com/luishenrique/domain/repository/GalleryRepository.kt diff --git a/domain/src/main/java/com/luishenrique/domain/repository/GalleryRepositoryImpl.kt b/domain/src/main/kotlin/com/luishenrique/domain/repository/GalleryRepositoryImpl.kt similarity index 100% rename from domain/src/main/java/com/luishenrique/domain/repository/GalleryRepositoryImpl.kt rename to domain/src/main/kotlin/com/luishenrique/domain/repository/GalleryRepositoryImpl.kt diff --git a/domain/src/main/java/com/luishenrique/domain/usecase/GalleryUseCase.kt b/domain/src/main/kotlin/com/luishenrique/domain/usecase/GalleryUseCase.kt similarity index 100% rename from domain/src/main/java/com/luishenrique/domain/usecase/GalleryUseCase.kt rename to domain/src/main/kotlin/com/luishenrique/domain/usecase/GalleryUseCase.kt diff --git a/domain/src/main/java/com/luishenrique/domain/usecase/GalleryUseCaseImpl.kt b/domain/src/main/kotlin/com/luishenrique/domain/usecase/GalleryUseCaseImpl.kt similarity index 100% rename from domain/src/main/java/com/luishenrique/domain/usecase/GalleryUseCaseImpl.kt rename to domain/src/main/kotlin/com/luishenrique/domain/usecase/GalleryUseCaseImpl.kt From 948e1b582b7b5b9d680f84de4f251f93ff6a4de7 Mon Sep 17 00:00:00 2001 From: Luis Henrique <65178969+Louiixx-h@users.noreply.github.com> Date: Fri, 6 Oct 2023 19:07:49 -0300 Subject: [PATCH 02/30] ci: created configs for github actions --- .github/workflows/cicd.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/cicd.yml diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml new file mode 100644 index 0000000..c9405f0 --- /dev/null +++ b/.github/workflows/cicd.yml @@ -0,0 +1,26 @@ +name: cute-cat-gallery-ci-pipeline + +on: + pull_request: + branches: [main] + push: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4.1.0 + + - name: Setup Java JDK + uses: actions/setup-java@v3.13.0 + + - name: Build with Gradle + run: ./gradlew build + + - name: Upload a Build Artifact + uses: actions/upload-artifact@v3.1.3 + with: + name: CuteCatsGallery.apk + path: app/build/outputs/apk/app-debug.apk \ No newline at end of file From 7dc7a2f1d529308607fc1e929a7f293fb1653be2 Mon Sep 17 00:00:00 2001 From: Luis Henrique <65178969+Louiixx-h@users.noreply.github.com> Date: Fri, 6 Oct 2023 19:17:19 -0300 Subject: [PATCH 03/30] ci: updated java version --- .github/workflows/cicd.yml | 3 + app/build.gradle | 7 +- domain/build.gradle | 6 +- gradle/wrapper/gradle-wrapper.properties | 5 +- gradlew | 257 ++++++++++++++--------- 5 files changed, 164 insertions(+), 114 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index c9405f0..07bda03 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -15,6 +15,9 @@ jobs: - name: Setup Java JDK uses: actions/setup-java@v3.13.0 + with: + java-version: '17' + distribution: 'adopt' - name: Build with Gradle run: ./gradlew build diff --git a/app/build.gradle b/app/build.gradle index 3f85a39..24bc283 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,7 +1,6 @@ plugins { id 'com.android.application' id 'kotlin-android' - id 'kotlin-android-extensions' } android { @@ -28,11 +27,11 @@ android { } } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = '17' } } diff --git a/domain/build.gradle b/domain/build.gradle index 02629ef..21a5cb7 100644 --- a/domain/build.gradle +++ b/domain/build.gradle @@ -23,11 +23,11 @@ android { } } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = '17' } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f7396d2..ffed3a2 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Wed Dec 01 15:51:41 PST 2021 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip distributionPath=wrapper/dists -zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 4f906e0..1b6c787 100644 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ -#!/usr/bin/env sh +#!/bin/sh # -# Copyright 2015 the original author or authors. +# Copyright © 2015-2021 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,67 +17,101 @@ # ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## # Attempt to set APP_HOME + # Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` +APP_BASE_NAME=${0##*/} # 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"' # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum warn () { echo "$*" -} +} >&2 die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar @@ -87,9 +121,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -98,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" + JAVACMD=java which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the @@ -106,80 +140,95 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac fi -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. # For Cygwin or MSYS, switch paths to Windows format before running java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) fi - i=`expr $i + 1` + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg done - case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac fi -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=`save "$@"` +# 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. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' exec "$JAVACMD" "$@" From 0f5d7b43fb26484e53865f55b42ebaddb73d0408 Mon Sep 17 00:00:00 2001 From: Luis Henrique <65178969+Louiixx-h@users.noreply.github.com> Date: Fri, 6 Oct 2023 19:24:33 -0300 Subject: [PATCH 04/30] ci: added new command --- .github/workflows/cicd.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 07bda03..36a3a73 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -20,7 +20,9 @@ jobs: distribution: 'adopt' - name: Build with Gradle - run: ./gradlew build + run: | + chmod +x ./gradlew + ./gradlew build | chmod +x ./gradlew - name: Upload a Build Artifact uses: actions/upload-artifact@v3.1.3 From 749624140858776dd5fb793ce9757b062f9f7675 Mon Sep 17 00:00:00 2001 From: Luis Henrique <65178969+Louiixx-h@users.noreply.github.com> Date: Fri, 6 Oct 2023 20:24:56 -0300 Subject: [PATCH 05/30] ci: added new command --- .github/workflows/cicd.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 36a3a73..c66e327 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -19,10 +19,22 @@ jobs: java-version: '17' distribution: 'adopt' + - name: Setup Android SDK + uses: android-actions/setup-android@v2 + + - name: Setup Gradle Cache + uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }} + + - name: Make gradlew executable + run: chmod +x ./gradlew + - name: Build with Gradle - run: | - chmod +x ./gradlew - ./gradlew build | chmod +x ./gradlew + run: ./gradlew build - name: Upload a Build Artifact uses: actions/upload-artifact@v3.1.3 From 23d1794a8f2bb7c43dff0bf6c1bcc93a68d4fcf7 Mon Sep 17 00:00:00 2001 From: Luis Henrique <65178969+Louiixx-h@users.noreply.github.com> Date: Fri, 6 Oct 2023 20:29:04 -0300 Subject: [PATCH 06/30] ci: added new command --- .github/workflows/cicd.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index c66e327..7011896 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -19,9 +19,6 @@ jobs: java-version: '17' distribution: 'adopt' - - name: Setup Android SDK - uses: android-actions/setup-android@v2 - - name: Setup Gradle Cache uses: actions/cache@v2 with: @@ -33,6 +30,9 @@ jobs: - name: Make gradlew executable run: chmod +x ./gradlew + - name: Add Gradle Wrapper + run: git add -f gradle/wrapper/gradle-wrapper.jar + - name: Build with Gradle run: ./gradlew build From 1276255f1b7ed351b7b552773663281ea99ce54e Mon Sep 17 00:00:00 2001 From: Luis Henrique <65178969+Louiixx-h@users.noreply.github.com> Date: Fri, 6 Oct 2023 22:02:04 -0300 Subject: [PATCH 07/30] chore: update cicd.yml --- .github/workflows/cicd.yml | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 7011896..b57c199 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -1,43 +1,24 @@ name: cute-cat-gallery-ci-pipeline - on: pull_request: branches: [main] push: branches: [main] - jobs: build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4.1.0 - - name: Setup Java JDK uses: actions/setup-java@v3.13.0 with: java-version: '17' distribution: 'adopt' - - - name: Setup Gradle Cache - uses: actions/cache@v2 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }} - - - name: Make gradlew executable - run: chmod +x ./gradlew - - - name: Add Gradle Wrapper - run: git add -f gradle/wrapper/gradle-wrapper.jar - - name: Build with Gradle run: ./gradlew build - - name: Upload a Build Artifact uses: actions/upload-artifact@v3.1.3 with: - name: CuteCatsGallery.apk - path: app/build/outputs/apk/app-debug.apk \ No newline at end of file + name: CuteCatsGallery + path: app/build/outputs/apk/app-debug.apk From 9b1b2fb0a63d253a5bd12afc0b545a44b9173475 Mon Sep 17 00:00:00 2001 From: Luis Henrique <65178969+Louiixx-h@users.noreply.github.com> Date: Fri, 6 Oct 2023 22:04:18 -0300 Subject: [PATCH 08/30] chore: update cicd.yml --- .github/workflows/cicd.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index b57c199..00cb984 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -15,6 +15,8 @@ jobs: with: java-version: '17' distribution: 'adopt' + - name: Make gradlew executable + run: chmod +x ./gradlew - name: Build with Gradle run: ./gradlew build - name: Upload a Build Artifact From f16888a713883808f750f41dcbb83924aa59fa8d Mon Sep 17 00:00:00 2001 From: Luis Henrique <65178969+Louiixx-h@users.noreply.github.com> Date: Fri, 6 Oct 2023 22:07:27 -0300 Subject: [PATCH 09/30] Update cicd.yml --- .github/workflows/cicd.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 00cb984..f134c2e 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -15,6 +15,8 @@ jobs: with: java-version: '17' distribution: 'adopt' + - name: Add gradle wrapper + run: git add -f gradle/wrapper/gradle-wrapper.jar - name: Make gradlew executable run: chmod +x ./gradlew - name: Build with Gradle From 0c266def35db25d425e306b2a1280d89d87b67bb Mon Sep 17 00:00:00 2001 From: Luis Henrique <65178969+Louiixx-h@users.noreply.github.com> Date: Fri, 6 Oct 2023 22:11:10 -0300 Subject: [PATCH 10/30] Update cicd.yml --- .github/workflows/cicd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index f134c2e..e76c24f 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -15,10 +15,10 @@ jobs: with: java-version: '17' distribution: 'adopt' - - name: Add gradle wrapper - run: git add -f gradle/wrapper/gradle-wrapper.jar - name: Make gradlew executable run: chmod +x ./gradlew + - name: Add gradle wrapper + run: ./gradlew wrapper - name: Build with Gradle run: ./gradlew build - name: Upload a Build Artifact From bca244cf2453186b07d2f27989ea0fbdc59ab0a0 Mon Sep 17 00:00:00 2001 From: Luis Henrique <65178969+Louiixx-h@users.noreply.github.com> Date: Fri, 6 Oct 2023 22:15:04 -0300 Subject: [PATCH 11/30] chore: updated gradle --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 922c88f..fcb3742 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { mavenCentral() } dependencies { - classpath "com.android.tools.build:gradle:7.0.3" + classpath "com.android.tools.build:gradle:7.0.4" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.20" // NOTE: Do not place your application dependencies here; they belong From 630d13cd063b3edf18873a7e68bf9d0aa5f37e9b Mon Sep 17 00:00:00 2001 From: Luis Henrique <65178969+Louiixx-h@users.noreply.github.com> Date: Fri, 6 Oct 2023 22:23:09 -0300 Subject: [PATCH 12/30] Update cicd.yml --- .github/workflows/cicd.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index e76c24f..40c7f77 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -17,10 +17,11 @@ jobs: distribution: 'adopt' - name: Make gradlew executable run: chmod +x ./gradlew - - name: Add gradle wrapper - run: ./gradlew wrapper - - name: Build with Gradle - run: ./gradlew build + - name: Gradle Build Action + uses: gradle/gradle-build-action@v2.9.0 + with: + arguments: build + gradle-version: 6.8 - name: Upload a Build Artifact uses: actions/upload-artifact@v3.1.3 with: From 2f46612e0999320c5b0f5d1894843655b485c0c5 Mon Sep 17 00:00:00 2001 From: Luis Henrique <65178969+Louiixx-h@users.noreply.github.com> Date: Fri, 6 Oct 2023 22:25:22 -0300 Subject: [PATCH 13/30] Update cicd.yml --- .github/workflows/cicd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 40c7f77..e64c051 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -21,7 +21,7 @@ jobs: uses: gradle/gradle-build-action@v2.9.0 with: arguments: build - gradle-version: 6.8 + gradle-version: 7.2 - name: Upload a Build Artifact uses: actions/upload-artifact@v3.1.3 with: From 73f805e86a8ae2048718986adb5796db938a9fd4 Mon Sep 17 00:00:00 2001 From: Luis Henrique <65178969+Louiixx-h@users.noreply.github.com> Date: Fri, 6 Oct 2023 22:33:34 -0300 Subject: [PATCH 14/30] Update cicd.yml --- .github/workflows/cicd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index e64c051..8f6c72f 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -21,7 +21,7 @@ jobs: uses: gradle/gradle-build-action@v2.9.0 with: arguments: build - gradle-version: 7.2 + gradle-version: 7.3 - name: Upload a Build Artifact uses: actions/upload-artifact@v3.1.3 with: From dc4a998453f5faf7b4a8464383b37affcdb46308 Mon Sep 17 00:00:00 2001 From: Luis Henrique <65178969+Louiixx-h@users.noreply.github.com> Date: Sat, 7 Oct 2023 08:40:06 -0300 Subject: [PATCH 15/30] chore: updated gradle --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ffed3a2..76101e5 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip +distributionUrl=https\\://services.gradle.org/distributions/gradle-7.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From a83a0c4dc2ae5d498f074e0cd5beaebe4d75f6cb Mon Sep 17 00:00:00 2001 From: Luis Henrique <65178969+Louiixx-h@users.noreply.github.com> Date: Sat, 7 Oct 2023 09:06:43 -0300 Subject: [PATCH 16/30] chore: updated gradle --- app/build.gradle | 5 +++-- app/src/main/AndroidManifest.xml | 3 +-- build.gradle | 4 ++-- domain/build.gradle | 7 +++---- domain/src/main/AndroidManifest.xml | 3 +-- gradle/wrapper/gradle-wrapper.properties | 2 +- 6 files changed, 11 insertions(+), 13 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 24bc283..f433448 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -4,7 +4,7 @@ plugins { } android { - compileSdk 31 + compileSdk 33 viewBinding { enabled = true @@ -13,7 +13,7 @@ android { defaultConfig { applicationId "com.luishenrique.cutecatsgallery" minSdk 21 - targetSdk 31 + targetSdkVersion 33 versionCode 1 versionName "1.0" @@ -33,6 +33,7 @@ android { kotlinOptions { jvmTarget = '17' } + namespace 'com.luishenrique.cutecatsgallery' } dependencies { diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index d127b9f..6c4abfe 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ - + diff --git a/build.gradle b/build.gradle index fcb3742..8e0ae0b 100644 --- a/build.gradle +++ b/build.gradle @@ -5,8 +5,8 @@ buildscript { mavenCentral() } dependencies { - classpath "com.android.tools.build:gradle:7.0.4" - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.20" + classpath 'com.android.tools.build:gradle:7.4.2' + classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/domain/build.gradle b/domain/build.gradle index 21a5cb7..9b9a4b0 100644 --- a/domain/build.gradle +++ b/domain/build.gradle @@ -4,13 +4,11 @@ plugins { } android { - compileSdk 31 + compileSdk 33 defaultConfig { minSdk 21 - targetSdk 31 - versionCode 1 - versionName "1.0" + targetSdkVersion 33 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles "consumer-rules.pro" @@ -29,6 +27,7 @@ android { kotlinOptions { jvmTarget = '17' } + namespace 'com.luishenrique.domain' } dependencies { diff --git a/domain/src/main/AndroidManifest.xml b/domain/src/main/AndroidManifest.xml index df895ba..a5918e6 100644 --- a/domain/src/main/AndroidManifest.xml +++ b/domain/src/main/AndroidManifest.xml @@ -1,5 +1,4 @@ - + \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 76101e5..8049c68 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\\://services.gradle.org/distributions/gradle-7.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From 91488a07f8f3482e8392a82fcf375a20216af2c7 Mon Sep 17 00:00:00 2001 From: Luis Henrique <65178969+Louiixx-h@users.noreply.github.com> Date: Sat, 7 Oct 2023 09:09:36 -0300 Subject: [PATCH 17/30] chore: updated gradle version --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 8049c68..2ec77e5 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ 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-7.5-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From 355b4a6270a6dd016084144ae9a31a10363c03c8 Mon Sep 17 00:00:00 2001 From: Luis Henrique <65178969+Louiixx-h@users.noreply.github.com> Date: Sat, 7 Oct 2023 09:11:57 -0300 Subject: [PATCH 18/30] ci: updated gradle plugin version --- .github/workflows/cicd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 8f6c72f..689bfff 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -21,7 +21,7 @@ jobs: uses: gradle/gradle-build-action@v2.9.0 with: arguments: build - gradle-version: 7.3 + gradle-version: 7.5 - name: Upload a Build Artifact uses: actions/upload-artifact@v3.1.3 with: From 5e6e8d45c3628246b1af14fb65d15e9f7c5f1fed Mon Sep 17 00:00:00 2001 From: Luis Henrique <65178969+Louiixx-h@users.noreply.github.com> Date: Sat, 7 Oct 2023 15:46:56 -0300 Subject: [PATCH 19/30] refactor: added imports --- .../luishenrique/cutecatsgallery/ui/adapter/HomeAdapter.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/kotlin/com/luishenrique/cutecatsgallery/ui/adapter/HomeAdapter.kt b/app/src/main/kotlin/com/luishenrique/cutecatsgallery/ui/adapter/HomeAdapter.kt index d965fda..6325bfb 100644 --- a/app/src/main/kotlin/com/luishenrique/cutecatsgallery/ui/adapter/HomeAdapter.kt +++ b/app/src/main/kotlin/com/luishenrique/cutecatsgallery/ui/adapter/HomeAdapter.kt @@ -13,6 +13,8 @@ import android.graphics.drawable.Drawable import com.luishenrique.cutecatsgallery.R import java.io.File import android.graphics.Bitmap +import android.graphics.drawable.BitmapDrawable +import android.os.Environment import android.widget.ImageView import android.widget.TextView import kotlinx.coroutines.CoroutineScope @@ -24,7 +26,9 @@ import java.lang.Exception import com.bumptech.glide.load.DataSource import com.bumptech.glide.load.engine.GlideException import com.bumptech.glide.request.RequestListener +import com.bumptech.glide.request.target.CustomTarget import com.bumptech.glide.request.target.Target +import com.bumptech.glide.request.transition.Transition import com.google.android.material.progressindicator.CircularProgressIndicator class HomeAdapter( From d6c71e5e659cfa62b175f61125183f4c96b14690 Mon Sep 17 00:00:00 2001 From: Luis Henrique <65178969+Louiixx-h@users.noreply.github.com> Date: Sat, 7 Oct 2023 16:08:18 -0300 Subject: [PATCH 20/30] build: updated gradle plugin --- build.gradle | 2 +- gradle.properties | 5 ++++- gradle/wrapper/gradle-wrapper.properties | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 8e0ae0b..b4e33eb 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.4.2' + classpath 'com.android.tools.build:gradle:8.1.2' classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21' // NOTE: Do not place your application dependencies here; they belong diff --git a/gradle.properties b/gradle.properties index 98bed16..8145fa7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,4 +18,7 @@ android.useAndroidX=true # Automatically convert third-party libraries to use AndroidX android.enableJetifier=true # Kotlin code style for this project: "official" or "obsolete": -kotlin.code.style=official \ No newline at end of file +kotlin.code.style=official +android.defaults.buildfeatures.buildconfig=true +android.nonTransitiveRClass=false +android.nonFinalResIds=false \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2ec77e5..3a02907 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From 1ea83bb95ff90ae1e66b84e054ad3efef42587ed Mon Sep 17 00:00:00 2001 From: Luis Henrique <65178969+Louiixx-h@users.noreply.github.com> Date: Sat, 7 Oct 2023 16:08:42 -0300 Subject: [PATCH 21/30] chore: new folder added in gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index fe9ad7b..276b709 100644 --- a/.gitignore +++ b/.gitignore @@ -334,4 +334,5 @@ $RECYCLE.BIN/ # Windows shortcuts *.lnk -# End of https://www.gitignore.io/api/java,linux,macos,windows,android,intellij,androidstudio \ No newline at end of file +# End of https://www.gitignore.io/api/java,linux,macos,windows,android,intellij,androidstudio +/.idea/ From 12299cb7c8878d4ca764dc58ee3ffb147ba52028 Mon Sep 17 00:00:00 2001 From: Luis Henrique <65178969+Louiixx-h@users.noreply.github.com> Date: Sat, 7 Oct 2023 16:10:43 -0300 Subject: [PATCH 22/30] ci: updated gradle plugin version --- .github/workflows/cicd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 689bfff..0692cdb 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -21,7 +21,7 @@ jobs: uses: gradle/gradle-build-action@v2.9.0 with: arguments: build - gradle-version: 7.5 + gradle-version: 8.0 - name: Upload a Build Artifact uses: actions/upload-artifact@v3.1.3 with: From 3736d8c30301dcc31be1224bdb550346f93d2b64 Mon Sep 17 00:00:00 2001 From: Luis Henrique <65178969+Louiixx-h@users.noreply.github.com> Date: Sat, 7 Oct 2023 16:18:18 -0300 Subject: [PATCH 23/30] build: updated gradle version --- .github/workflows/cicd.yml | 2 +- build.gradle | 3 ++- gradle/wrapper/gradle-wrapper.properties | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 0692cdb..32ff706 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -21,7 +21,7 @@ jobs: uses: gradle/gradle-build-action@v2.9.0 with: arguments: build - gradle-version: 8.0 + gradle-version: 7.6 - name: Upload a Build Artifact uses: actions/upload-artifact@v3.1.3 with: diff --git a/build.gradle b/build.gradle index b4e33eb..7582246 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,8 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:8.1.2' + def gradle_version = "7.4.2" + classpath "com.android.tools.build:gradle:$gradle_version" classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21' // NOTE: Do not place your application dependencies here; they belong diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3a02907..f42e62f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From 424377e0659e8444f6301568f82880d54f663767 Mon Sep 17 00:00:00 2001 From: Luis Henrique <65178969+Louiixx-h@users.noreply.github.com> Date: Sat, 7 Oct 2023 16:32:16 -0300 Subject: [PATCH 24/30] chore: added new permission --- app/src/main/AndroidManifest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 6c4abfe..e07327e 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -4,6 +4,7 @@ + Date: Sat, 7 Oct 2023 16:46:08 -0300 Subject: [PATCH 25/30] chore: renamed ci file --- .github/workflows/{cicd.yml => ci_pipeline.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{cicd.yml => ci_pipeline.yml} (100%) diff --git a/.github/workflows/cicd.yml b/.github/workflows/ci_pipeline.yml similarity index 100% rename from .github/workflows/cicd.yml rename to .github/workflows/ci_pipeline.yml From 4659a74670586bf600ed8782223d9c07a49aa251 Mon Sep 17 00:00:00 2001 From: Luis Henrique <65178969+Louiixx-h@users.noreply.github.com> Date: Sat, 7 Oct 2023 16:55:22 -0300 Subject: [PATCH 26/30] ci: added new job --- .github/workflows/ci_pipeline.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index 32ff706..39b3f9d 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -22,6 +22,8 @@ jobs: with: arguments: build gradle-version: 7.6 + - name: Run Tests + run: ./gradlew test - name: Upload a Build Artifact uses: actions/upload-artifact@v3.1.3 with: From 90c4e596c78fe33e074175d89aa9806e02b27e0b Mon Sep 17 00:00:00 2001 From: Luis Henrique <65178969+Louiixx-h@users.noreply.github.com> Date: Sat, 7 Oct 2023 19:42:06 -0300 Subject: [PATCH 27/30] ci: added test job --- .github/workflows/ci_pipeline.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index 39b3f9d..beb4193 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -20,7 +20,9 @@ jobs: - name: Gradle Build Action uses: gradle/gradle-build-action@v2.9.0 with: - arguments: build + arguments: | + build + test gradle-version: 7.6 - name: Run Tests run: ./gradlew test From b34d8dd901ba63cebb2a65f7391bc0c4c1a73933 Mon Sep 17 00:00:00 2001 From: Luis Henrique <65178969+Louiixx-h@users.noreply.github.com> Date: Sat, 7 Oct 2023 19:47:51 -0300 Subject: [PATCH 28/30] ci: added test job --- .github/workflows/ci_pipeline.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index beb4193..be541ef 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -20,12 +20,13 @@ jobs: - name: Gradle Build Action uses: gradle/gradle-build-action@v2.9.0 with: - arguments: | - build - test + arguments: build gradle-version: 7.6 - name: Run Tests - run: ./gradlew test + uses: gradle/gradle-build-action@v2.9.0 + with: + arguments: test + gradle-version: 7.6 - name: Upload a Build Artifact uses: actions/upload-artifact@v3.1.3 with: From dfa5a82c5d2aacb9b66e13328310c503fc3b8379 Mon Sep 17 00:00:00 2001 From: Luis Henrique <65178969+Louiixx-h@users.noreply.github.com> Date: Sat, 7 Oct 2023 19:49:57 -0300 Subject: [PATCH 29/30] ci: renamed apk path --- .github/workflows/ci_pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index be541ef..0b84a1f 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -31,4 +31,4 @@ jobs: uses: actions/upload-artifact@v3.1.3 with: name: CuteCatsGallery - path: app/build/outputs/apk/app-debug.apk + path: app/build/outputs/apk/debug/app-debug.apk From bbd834125038a11208f6f6c170177cb6f0032178 Mon Sep 17 00:00:00 2001 From: Luis Henrique <65178969+Louiixx-h@users.noreply.github.com> Date: Sat, 14 Oct 2023 19:47:03 -0300 Subject: [PATCH 30/30] docs: updated readme --- README.md | 119 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 114 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e495984..a718d52 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,118 @@ -# Cute Cats Gallery + -Galeria de gatinhos fofos - -
- +[![Contributors][contributors-shield]][contributors-url] +[![Forks][forks-shield]][forks-url] +[![Stargazers][stars-shield]][stars-url] +[![Issues][issues-shield]][issues-url] +[![MIT License][license-shield]][license-url] +[![LinkedIn][linkedin-shield]][linkedin-url] + +
+
+ + Logo + + +

Cute Cats Gallery

+
+ +
+ Table of Contents +
    +
  1. + About The Project + +
  2. +
  3. + Getting Started + +
  4. +
  5. Usage
  6. +
  7. Roadmap
  8. +
  9. Contributing
  10. +
  11. License
  12. +
  13. Contact
  14. +
  15. Acknowledgments
  16. +
+
+ +## About The Project +
+
+ +### Built With + +* Kotlin +* Android Studio +* View Model +* Coroutines +* View Binding +* Koin +* Glide +* Retrofit +* Gson + +## Clone project + +```git clone https://github.dev/Louiixx-h/cute-cats-gallery-app``` + +## Contributing + +Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**. + +If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "improvement". +Don't forget to give the project a star! Thanks again! + +1. Fork the Project +2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`) +3. Commit your Changes (`git commit -m 'feat: Add some AmazingFeature'`) +4. Push to the Branch (`git push origin feature/AmazingFeature`) +5. Open a Pull Request + +## Contact + +Luis Henrique da Silva Moreira - [luis-henrique.dev](https://luis-henrique.dev/) - louix.sm@gmail.com + +Project Link: [https://github.dev/Louiixx-h/cute-cats-gallery-app](https://github.dev/Louiixx-h/cute-cats-gallery-app) + + + + +[contributors-shield]: https://img.shields.io/github/contributors/othneildrew/Best-README-Template.svg?style=for-the-badge +[contributors-url]: https://github.com/othneildrew/Best-README-Template/graphs/contributors +[forks-shield]: https://img.shields.io/github/forks/othneildrew/Best-README-Template.svg?style=for-the-badge +[forks-url]: https://github.com/othneildrew/Best-README-Template/network/members +[stars-shield]: https://img.shields.io/github/stars/othneildrew/Best-README-Template.svg?style=for-the-badge +[stars-url]: https://github.com/othneildrew/Best-README-Template/stargazers +[issues-shield]: https://img.shields.io/github/issues/othneildrew/Best-README-Template.svg?style=for-the-badge +[issues-url]: https://github.com/othneildrew/Best-README-Template/issues +[license-shield]: https://img.shields.io/github/license/othneildrew/Best-README-Template.svg?style=for-the-badge +[license-url]: https://github.com/othneildrew/Best-README-Template/blob/master/LICENSE.txt +[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555 +[linkedin-url]: https://linkedin.com/in/luishenr-m +[product-screenshot]: images/screenshot.png +[Next.js]: https://img.shields.io/badge/next.js-000000?style=for-the-badge&logo=nextdotjs&logoColor=white +[Next-url]: https://nextjs.org/ +[React.js]: https://img.shields.io/badge/React-20232A?style=for-the-badge&logo=react&logoColor=61DAFB +[React-url]: https://reactjs.org/ +[Vue.js]: https://img.shields.io/badge/Vue.js-35495E?style=for-the-badge&logo=vuedotjs&logoColor=4FC08D +[Vue-url]: https://vuejs.org/ +[Angular.io]: https://img.shields.io/badge/Angular-DD0031?style=for-the-badge&logo=angular&logoColor=white +[Angular-url]: https://angular.io/ +[Svelte.dev]: https://img.shields.io/badge/Svelte-4A4A55?style=for-the-badge&logo=svelte&logoColor=FF3E00 +[Svelte-url]: https://svelte.dev/ +[Laravel.com]: https://img.shields.io/badge/Laravel-FF2D20?style=for-the-badge&logo=laravel&logoColor=white +[Laravel-url]: https://laravel.com +[Bootstrap.com]: https://img.shields.io/badge/Bootstrap-563D7C?style=for-the-badge&logo=bootstrap&logoColor=white +[Bootstrap-url]: https://getbootstrap.com +[JQuery.com]: https://img.shields.io/badge/jQuery-0769AD?style=for-the-badge&logo=jquery&logoColor=white +[JQuery-url]: https://jquery.com +