Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
37 changes: 37 additions & 0 deletions .github/workflows/AndroidBuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: AndroidBuild
on:
push:
branches: [ '**' ]
pull_request:
branches: [ '**' ]

jobs :
build :
runs-on : ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]

- name: Setup Java JDK
uses: actions/[email protected]
with:
java-version: '17'
distribution: 'zulu'

- name: Run Lint
run: ./gradlew lint

- name: Run Detekt
run: ./gradlew detekt

- name: Build with Gradle
run: ./gradlew build

- name: Run Tests
run: ./gradlew test

- name: Upload a Build Artifact
uses: actions/[email protected]
with:
name: DesafioAndroid.apk
path: app/build/outputs/apk/debug/app-debug.apk
66 changes: 54 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,55 @@
# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

# Android Studio generated files and folders
captures/
.externalNativeBuild/
.cxx/
*.apk
output.json

# IDE
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.idea/
misc.xml
deploymentTargetDropDown.xml
render.experimental.xml

# Keystore files
*.jks
*.keystore

# Google Services (e.g. APIs or Firebase)
google-services.json

# Android Profiling
*.hprof
125 changes: 0 additions & 125 deletions .idea/codeStyles/Project.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/codeStyles/codeStyleConfig.xml

This file was deleted.

7 changes: 0 additions & 7 deletions .idea/dictionaries/mdime.xml

This file was deleted.

4 changes: 0 additions & 4 deletions .idea/encodings.xml

This file was deleted.

18 changes: 0 additions & 18 deletions .idea/gradle.xml

This file was deleted.

14 changes: 0 additions & 14 deletions .idea/misc.xml

This file was deleted.

12 changes: 0 additions & 12 deletions .idea/runConfigurations.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

53 changes: 53 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Define variables
GRADLEW = gradlew.bat
ADB = adb

# Default target (runs `make build`)
all: build

# Build the debug APK
build:
$(GRADLEW) assembleDebug

# Run unit and instrumented tests
all-tests:
$(GRADLEW) test
$(GRADLEW) uitest

# Run unit tests
test:
$(GRADLEW) test

# Run instrumentation tests on a connected device/emulator
uitest:
make start-emulator
$(GRADLEW) connectedAndroidTest

# Run lint and detekt
lint:
$(GRADLEW) lint
$(GRADLEW) detekt

# Clean the project
clean:
$(GRADLEW) clean

# Install the debug APK on a connected device/emulator
install:
$(ADB) install -r app/build/outputs/apk/debug/app-debug.apk

# Uninstall the app from the device/emulator
uninstall:
$(ADB) uninstall com.example.yourapp

# Open the logcat to debug
logcat:
$(ADB) logcat -s "YourAppTag"

start-emulator:
@echo "Starting emulator..."
adb devices | findstr emulator || start cmd /c "emulator -avd Medium_Phone_API_34 -no-snapshot-load"
@echo "Waiting for device to be ready..."
adb wait-for-device

.PHONY: all build release test uitest clean install uninstall logcat start-emulator
Loading