Skip to content

Commit c92a200

Browse files
authored
Merge pull request #9 from hegocre/issue/8/multiple-score
Multiple scores
2 parents 7c4145c + 734b804 commit c92a200

67 files changed

Lines changed: 1169 additions & 685 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/android.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/checkout@v2
16-
- name: set up JDK 11
17-
uses: actions/setup-java@v1
18-
with:
19-
java-version: '11'
20-
21-
- name: Grant execute permission for gradlew
22-
run: chmod +x gradlew
23-
- name: Build mobile with Gradle
24-
run: ./gradlew clean && ./gradlew assembleDebug
25-
- uses: actions/upload-artifact@v2
26-
with:
27-
name: mobile-debug.apk
28-
path: mobile/build/outputs/apk/debug/mobile-debug.apk
29-
- name: Build wear with Gradle
30-
run: ./gradlew clean && ./gradlew :wear:assembleDebug
31-
- uses: actions/upload-artifact@v2
32-
with:
33-
name: wear-debug.apk
34-
path: wear/build/outputs/apk/debug/wear-debug.apk
15+
- uses: actions/checkout@v3
16+
- name: set up JDK 11
17+
uses: actions/setup-java@v3
18+
with:
19+
java-version: '17'
20+
distribution: 'zulu'
21+
- name: Grant execute permission for gradlew
22+
run: chmod +x gradlew
23+
- name: Build mobile with Gradle
24+
run: ./gradlew clean && ./gradlew assembleDebug
25+
- uses: actions/upload-artifact@v3
26+
with:
27+
name: mobile-debug.apk
28+
path: mobile/build/outputs/apk/debug/mobile-debug.apk
29+
- name: Build wear with Gradle
30+
run: ./gradlew clean && ./gradlew :wear:assembleDebug
31+
- uses: actions/upload-artifact@v3
32+
with:
33+
name: wear-debug.apk
34+
path: wear/build/outputs/apk/debug/wear-debug.apk

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
# Score Counter
2-
Simple app to keep track of two scores. Also available on Wear OS.
2+
3+
Simple app to keep track of multiple scores, making it easy by allowing you to set player names .
4+
Also available on Wear OS.
5+
6+
[<img src="screenshots/mobile00.png" width=180>](screenshots/mobile00.png)
7+
[<img src="screenshots/mobile01.png" width=180>](screenshots/mobile01.png)
38

49
How to use:
10+
511
* Click on the upper part of a score to increment it.
612
* Click on the lower part of a score to increment it.
713
* Long press on a score to reset it back to `0`.
814

915
The score is saved across sessions.
1016

1117
[<img src="https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png"
12-
alt="Get it on Google Play"
18+
alt="Get it on Google Play"
1319
height="80">](https://play.google.com/store/apps/details?id=es.hegocre.scorecounter)

build.gradle

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.kotlin_version = '1.8.0'
5-
ext.lifecycle_version = '2.5.1'
6-
ext.compose_version = '1.3.3'
4+
ext.kotlin_version = '1.9.10'
75
repositories {
86
google()
97
mavenCentral()
108
}
119
dependencies {
12-
classpath 'com.android.tools.build:gradle:7.4.2'
10+
classpath 'com.android.tools.build:gradle:8.1.1'
1311
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1412

1513
// NOTE: Do not place your application dependencies here; they belong
@@ -24,6 +22,6 @@ allprojects {
2422
}
2523
}
2624

27-
task clean(type: Delete) {
25+
tasks.register('clean', Delete) {
2826
delete rootProject.buildDir
2927
}

gradle.properties

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@
1111
# The setting is particularly useful for tweaking memory settings.
1212
# Default value: -Xmx10248m -XX:MaxPermSize=256m
1313
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14-
1514
# When configured, Gradle will run in incubating parallel mode.
1615
# This option should only be used with decoupled projects. More details, visit
1716
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1817
# org.gradle.parallel=true
19-
android.enableJetifier=true
18+
android.enableJetifier=false
2019
android.useAndroidX=true
2120
android.enableR8.fullMode=true
22-
org.gradle.unsafe.configuration-cache=true
21+
org.gradle.unsafe.configuration-cache=true
22+
android.defaults.buildfeatures.buildconfig=true
23+
android.nonTransitiveRClass=false
24+
android.nonFinalResIds=false

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip

mobile/build.gradle

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
1-
apply plugin: 'com.android.application'
2-
apply plugin: 'kotlin-android'
3-
apply plugin: 'kotlin-kapt'
1+
plugins {
2+
id 'com.android.application'
3+
id 'org.jetbrains.kotlin.android'
4+
id 'org.jetbrains.kotlin.plugin.serialization' version "$kotlin_version"
5+
}
46

57
android {
6-
compileSdkVersion 33
7-
buildToolsVersion '30.0.3'
8+
namespace 'es.hegocre.scorecounter'
9+
compileSdk 34
810

911
defaultConfig {
1012
applicationId "es.hegocre.scorecounter"
11-
minSdkVersion 24
12-
targetSdkVersion 33
13-
versionCode 331200000
14-
versionName "1.2.0"
13+
minSdk 24
14+
targetSdk 34
15+
versionCode 341400000
16+
versionName "1.4.0"
1517
resConfigs 'ca', 'es', 'en'
1618
}
1719

1820
buildTypes {
1921
release {
2022
shrinkResources true
2123
minifyEnabled true
22-
zipAlignEnabled true
2324
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
2425
}
2526
}
@@ -29,35 +30,36 @@ android {
2930
}
3031

3132
compileOptions {
32-
sourceCompatibility JavaVersion.VERSION_11
33-
targetCompatibility JavaVersion.VERSION_11
33+
sourceCompatibility JavaVersion.VERSION_17
34+
targetCompatibility JavaVersion.VERSION_17
3435
}
3536

3637
composeOptions {
37-
kotlinCompilerExtensionVersion '1.4.1'
38+
kotlinCompilerExtensionVersion '1.5.3'
3839
}
3940

4041
kotlinOptions {
41-
jvmTarget = '11'
42+
jvmTarget = '17'
4243
}
43-
namespace 'es.hegocre.scorecounter'
4444
}
4545

4646
dependencies {
4747
implementation fileTree(include: ['*.jar'], dir: 'libs')
4848

4949
//Android dependencies
50-
implementation 'androidx.core:core-ktx:1.9.0'
50+
implementation 'androidx.core:core-ktx:1.12.0'
5151

5252
//Compose
53-
implementation platform('androidx.compose:compose-bom:2023.04.00')
53+
implementation platform('androidx.compose:compose-bom:2023.09.00')
5454
implementation 'androidx.compose.material3:material3'
5555
implementation 'androidx.compose.ui:ui'
5656

57-
implementation 'androidx.activity:activity-compose:1.7.0'
57+
implementation 'androidx.activity:activity-compose:1.7.2'
58+
59+
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0'
5860

5961
testImplementation 'junit:junit:4.13.2'
60-
androidTestImplementation "androidx.compose.ui:ui-test-junit4"
62+
androidTestImplementation "androidx.compose.ui:ui-test-junit4:1.5.1"
6163
debugImplementation 'androidx.compose.ui:ui-tooling'
6264
debugImplementation 'androidx.compose.ui:ui-test-manifest'
6365
}

mobile/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
android:theme="@android:style/Theme.Material.Light.NoActionBar"
1313
tools:targetApi="s">
1414
<activity
15-
android:name="es.hegocre.scorecounter.MainActivity"
15+
android:name="es.hegocre.scorecounter.ui.MainActivity"
1616
android:configChanges="orientation|screenSize|keyboardHidden"
1717
android:exported="true"
1818
android:theme="@android:style/Theme.Material.Light.NoActionBar">

mobile/src/main/java/es/hegocre/scorecounter/MainActivity.kt

Lines changed: 0 additions & 178 deletions
This file was deleted.

0 commit comments

Comments
 (0)