Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
36 changes: 22 additions & 14 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
name: Android CI

on: [push]
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Gradle
run: sudo ./gradlew assemble
- name: Upload APK
uses: actions/upload-artifact@v2
with:
path: ./**/*.apk
if-no-files-found: warn

- uses: actions/checkout@v4
- name: set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
cache: gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew assemble
- name: Upload APK
uses: actions/upload-artifact@v4
with:
path: ./**/*.apk
if-no-files-found: warn
63 changes: 36 additions & 27 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: 'com.android.application'
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'de.mobilej.unmock'
apply plugin: 'com.getkeepsafe.dexcount'
Expand All @@ -11,12 +11,16 @@ composer {
}

repositories {
maven {url 'https://repo1.maven.org/maven2/' }
mavenCentral()
google()
jcenter()
maven { url 'https://jitpack.io' }
maven { url 'https://repo.clojars.org' }
maven { url 'https://linkedin.jfrog.io/artifactory/open-source/' }
}

android {
namespace "org.ligi.gobandroid_hd"
flavorDimensions "analytics", "cloud", "autostart"

productFlavors {
Expand Down Expand Up @@ -45,7 +49,7 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
tasks.withType(KotlinCompile).configureEach {
kotlinOptions {
jvmTarget = "1.8"
}
Expand All @@ -61,14 +65,13 @@ android {

}

compileSdkVersion 30
buildToolsVersion '29.0.3'
compileSdkVersion 36

defaultConfig {
versionCode 260
versionName "2.6.0"
minSdkVersion 21
targetSdkVersion 30
targetSdkVersion 34
applicationId "org.ligi.gobandroid_hd"
testInstrumentationRunner "org.ligi.gobandroid_hd.AppReplacingRunner"
archivesBaseName = "Gobandroid-$versionName"
Expand Down Expand Up @@ -114,58 +117,64 @@ android {
minifyEnabled false
}
}
buildFeatures {
viewBinding true
buildConfig true
aidl true
}
} // android

configurations {
all {
exclude module: 'commons-logging'
exclude module: 'httpclient'
exclude group: 'com.google.guava', module: 'listenablefuture'
}
}

dependencies {
implementation "org.permissionsdispatcher:permissionsdispatcher:4.8.0"
kapt "org.permissionsdispatcher:permissionsdispatcher-processor:4.8.0"
implementation "com.github.permissions-dispatcher:permissionsdispatcher:4.9.2"
kapt "com.github.permissions-dispatcher:permissionsdispatcher-processor:4.9.2"
implementation 'com.github.salomonbrys.kodein:kodein:4.1.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.recyclerview:recyclerview:1.3.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.preference:preference-ktx:1.1.1'
implementation 'com.google.android.material:material:1.10.0'
implementation 'androidx.preference:preference-ktx:1.2.0'
implementation 'com.github.ligi:KAXT:1.0'
implementation 'com.github.ligi:tracedroid:4.1'
implementation 'com.jakewharton.timber:timber:4.7.1'
implementation 'com.jakewharton.timber:timber:5.0.1'

implementation 'com.github.ligi.snackengage:snackengage-playrate:0.27'
implementation 'com.github.ligi:ExtraCompats:1.0'
implementation 'jchardet:jchardet:1.1.0'
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
implementation 'com.n3twork.druid:alphanum:1.0.3'
implementation 'androidx.annotation:annotation:1.1.0'
implementation 'androidx.annotation:annotation:1.9.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "com.chibatching.kotpref:kotpref:$kotpref_version"
implementation "com.chibatching.kotpref:initializer:$kotpref_version"
withAnalyticsImplementation "com.google.android.gms:play-services-analytics:17.0.0"
withAnalyticsImplementation "com.google.android.gms:play-services-analytics:18.0.2"
withCloudImplementation "com.google.android.gms:play-services-games:19.0.0"
withCloudImplementation "com.google.android.gms:play-services-plus:17.0.0"
withCloudImplementation "com.google.android.gms:play-services-gcm:17.0.0"
withCloudImplementation('com.google.apis:google-api-services-games:v1-rev98-1.20.0') {
exclude module: 'jsr305'
}
androidTestImplementation 'androidx.test:runner:1.5.1'
androidTestImplementation 'androidx.test:rules:1.3.0'
androidTestImplementation 'org.hamcrest:hamcrest-library:2.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
androidTestImplementation 'androidx.test:runner:1.5.2'
androidTestImplementation 'androidx.test:rules:1.5.0'
androidTestImplementation 'org.hamcrest:hamcrest-library:3.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
androidTestImplementation 'com.github.ligi:trulesk:4.0'
androidTestImplementation 'androidx.annotation:annotation:1.1.0'
androidTestImplementation 'com.github.ligi:trulesk:4.3'
androidTestImplementation 'androidx.annotation:annotation:1.9.1'
androidTestImplementation 'com.squareup.assertj:assertj-android:1.2.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
testImplementation 'com.squareup.assertj:assertj-android:1.2.0'
testImplementation 'androidx.annotation:annotation:1.1.0'
testImplementation 'androidx.annotation:annotation:1.9.1'
testImplementation 'junit:junit:4.13.2'

implementation 'com.google.android:flexbox:2.0.1'
implementation 'org.greenrobot:eventbus:3.0.0'
implementation 'com.google.android.flexbox:flexbox:3.0.0'
implementation 'org.greenrobot:eventbus:3.3.1'

}
2 changes: 2 additions & 0 deletions android/proguard-project.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,5 @@
-dontwarn org.conscrypt.**
# A resource is loaded with a relative path so the package of this class must be preserved.
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase

-dontwarn com.google.protobuf.java_com_google_android_gmscore_sdk*
3 changes: 1 addition & 2 deletions android/src/androidTest/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:tools="http://schemas.android.com/tools"
package="org.ligi.gobandroid_hd">
<manifest xmlns:tools="http://schemas.android.com/tools">

<uses-sdk tools:overrideLibrary="com.jraska.falcon.spooncompat , com.jraska.falcon"/>

Expand Down
21 changes: 13 additions & 8 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="org.ligi.gobandroid_hd"

android:installLocation="auto">

<supports-screens
Expand All @@ -12,6 +10,7 @@
android:smallScreens="true" />

<!-- Permission to keep the screen awake -->
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Expand All @@ -38,7 +37,8 @@
android:name="com.sec.android.app.multiwindow"
android:required="false" />

<activity android:name="org.ligi.gobandroid_hd.ui.game_setup.GoSetupActivity">
<activity android:name="org.ligi.gobandroid_hd.ui.game_setup.GoSetupActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand All @@ -49,7 +49,8 @@
</activity>
<activity
android:name="org.ligi.gobandroid_hd.ui.GobanDroidTVActivity"
android:icon="@drawable/gobandroid_tv"
android:exported="true"
android:icon="@drawable/gobandroid_tv"
android:label="Gobandroid TV"
android:launchMode="singleTask">
<intent-filter>
Expand All @@ -63,7 +64,8 @@
<category android:name="tv.ouya.intent.category.GAME" />
</intent-filter>
</activity>
<activity android:name="org.ligi.gobandroid_hd.ui.GobanDroidTVActivityNOIF">
<activity android:name="org.ligi.gobandroid_hd.ui.GobanDroidTVActivityNOIF"
android:exported="true">
<intent-filter>
<action android:name="org.ligi.gobandroid.NOIF" />
<category android:name="android.intent.category.DEFAULT" />
Expand All @@ -73,7 +75,8 @@
android:name="org.ligi.gobandroid_hd.ui.go_terminology.GoTerminologyViewActivity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:theme="@style/TransparentTheme">
android:exported="true"
android:theme="@style/TransparentTheme">
<intent-filter>
<action android:name="android.intent.action.VIEW" />

Expand All @@ -96,7 +99,8 @@
android:exported="true"
android:launchMode="singleInstance" />
<activity android:name="org.ligi.gobandroid_hd.ui.SGFLoadActivity" />
<activity android:name="org.ligi.gobandroid_hd.ui.SGFLoadFromExternalActivity">
<activity android:name="org.ligi.gobandroid_hd.ui.SGFLoadFromExternalActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />

Expand Down Expand Up @@ -218,7 +222,8 @@
<data android:mimeType="application/x-go-sgf" />
</intent-filter>
</activity>
<activity android:name="org.ligi.gobandroid_hd.ui.GoLinkLoadActivity">
<activity android:name="org.ligi.gobandroid_hd.ui.GoLinkLoadActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />

Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
package org.ligi.gobandroid_hd.ui

import android.os.Bundle
import kotlinx.android.synthetic.withCloud.profile.*
import org.ligi.gobandroid_hd.R
import org.ligi.gobandroid_hd.databinding.ProfileBinding
import org.ligi.gobandroid_hd.ui.application.GobandroidFragmentActivity

class BaseProfileActivity : GobandroidFragmentActivity() {

private lateinit var binding: ProfileBinding
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.profile)
binding = ProfileBinding.bind(pbinding.contentFrame.getChildAt(0))

setTitle(R.string.profile)

supportActionBar?.setDisplayShowTitleEnabled(true)

rank_edit.setText(GoPrefs.rank)
username_edit.setText(GoPrefs.username)
binding.rankEdit.setText(GoPrefs.rank)
binding.usernameEdit.setText(GoPrefs.username)
}


override fun onPause() {
GoPrefs.rank = rank_edit.text.toString()
GoPrefs.username = username_edit.text.toString()
GoPrefs.rank = binding.rankEdit.text.toString()
GoPrefs.username = binding.usernameEdit.text.toString()
super.onPause()
}

Expand Down
Loading