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
54 changes: 54 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# This is a basic workflow to help you get started with Actions

name: Build

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
paths-ignore:
- '**/README.md'
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
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: Setup Android NDK
uses: nttld/setup-ndk@v1.0.5
id: setup-ndk
with:
ndk-version: r21e
add-to-path: false
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}

- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: gradle wrapper && ./gradlew packageDebugUniversalApk
- name: Get app version
run: echo "APP_VERSION=v$(cat ./app/build.gradle | grep -m1 versionName | awk -F \" '{print $2}')" >> $GITHUB_ENV
- name: Get app name
run: echo "APP_NAME=HackersKeyboard-DEBUG#${{ github.run_number }}" >> $GITHUB_ENV
- name: Rename the APK file
run: mv ./app/build/outputs/universal_apk/debug/app-debug-universal.apk ./${{ env.APP_NAME }}.apk
- name: Store generated APK file
uses: actions/upload-artifact@v1
with:
name: ${{ env.APP_NAME }}
path: ./${{ env.APP_NAME }}.apk
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/build
/release
.cxx/*
17 changes: 9 additions & 8 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 26
compileSdkVersion 30
defaultConfig {
applicationId 'org.pocketworkstation.pckeyboard'
minSdkVersion 14
targetSdkVersion 26
minSdkVersion 21
targetSdkVersion 30
versionCode 1041001
versionName "v1.41.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
ndkVersion "21.3.6528147"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
externalNativeBuild {
cmake {
cppFlags ""
Expand Down Expand Up @@ -38,9 +39,9 @@ android {

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation "com.android.support:support-compat:26.0.0"
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'androidx.core:core:1.6.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,19 @@

package org.pocketworkstation.pckeyboard;

import android.inputmethodservice.InputMethodService;
import android.util.Log;
import android.util.SparseArray;
import android.view.inputmethod.EditorInfo;

import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

interface ComposeSequencing {
public void onText(CharSequence text);
public void updateShiftKeyState(EditorInfo attr);
public EditorInfo getCurrentInputEditorInfo();
void onText(CharSequence text);
void updateShiftKeyState(EditorInfo attr);
EditorInfo getCurrentInputEditorInfo();
}

public class ComposeSequence {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@

package org.pocketworkstation.pckeyboard;

import java.text.Normalizer;

import android.os.Build;
import android.util.Log;

import java.text.Normalizer;

public class DeadAccentSequence extends ComposeSequence {
private static final String TAG = "HK/DeadAccent";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
import android.os.Vibrator;
import android.preference.PreferenceActivity;
import android.preference.PreferenceManager;
import android.support.v4.app.NotificationCompat;
import android.support.v4.app.NotificationManagerCompat;
import androidx.core.app.NotificationCompat;
import androidx.core.app.NotificationManagerCompat;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.util.Log;
Expand Down
14 changes: 9 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.android.tools.build:gradle:4.2.2'


// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -18,10 +18,14 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

wrapper {
gradleVersion = '5.6.4'
}
1 change: 1 addition & 0 deletions gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
Expand Down
51 changes: 31 additions & 20 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 17 additions & 1 deletion gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.