Skip to content

Commit

Permalink
Merge pull request #87 from RyanKoech/enhancement/69
Browse files Browse the repository at this point in the history
Enhancment-69 :: Create a setup script for new collaborators
  • Loading branch information
RyanKoech authored Jul 30, 2023
2 parents 5554e48 + 32d29a6 commit 41a8f28
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 20 deletions.
26 changes: 6 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,6 @@ on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v2

- name: Make gradlew executable
run: chmod +x ./gradlew

- name: Enable android.useAndroidX property
run: echo 'android.useAndroidX=true' >> gradle.properties

- name: Build Debug Apk
run: ./gradlew assembleDebug

test:
runs-on: ubuntu-latest
Expand All @@ -30,13 +16,13 @@ jobs:
uses: actions/checkout@v2

- name: Make gradlew executable
run: chmod +x ./gradlew
run: chmod +x gradlew

- name: Enable android.useAndroidX property
run: echo 'android.useAndroidX=true' >> gradle.properties
- name: Make setup script executable
run: chmod +x setup.sh

- name: Set more jvm memory property
run: echo 'org.gradle.jvmargs=-Xmx2048m' >> gradle.properties
- name: Run setup script
run: ./setup.sh

- name: Build Debug Apk
- name: Run Unit Tests
run: ./gradlew test
10 changes: 10 additions & 0 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,17 @@ Link to app UI designs [here](./UiDesigns.md)
To get a local copy up and running follow these simple example steps.

```bash
# Clone Repo
git clone https://github.com/RyanKoech/android-krypto.git

# Make setup script executable
chmod +x setup.sh

# Run setup script (Linux) a bat file exists for windows systems as well
./setup.sh

# Build Debug Apk
./gradlew assembleDebug
```

### Prerequisites
Expand Down
9 changes: 9 additions & 0 deletions setup.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@echo off

set "source_file=gradle.properties.example"
set "destination_file=gradle.properties"

REM Copy the contents of the source file to the destination file
copy /Y "%source_file%" "%destination_file%" > nul

echo Contents copied from '%source_file%' to '%destination_file%'.
10 changes: 10 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

# Define the filenames
source_file="gradle.properties.example"
destination_file="gradle.properties"

# Copy the contents of the source file to the destination file
cp "$source_file" "$destination_file"

echo "Contents copied from '$source_file' to '$destination_file'."

0 comments on commit 41a8f28

Please sign in to comment.