diff --git a/.github/workflows/bintray-publish.yml b/.github/workflows/bintray-publish.yml new file mode 100644 index 0000000..94b040e --- /dev/null +++ b/.github/workflows/bintray-publish.yml @@ -0,0 +1,34 @@ +name: Publish to bintray on closed PR +on: + # Trigger the workflow on push to master branch + push: + branches: [master] + +jobs: + gradle: + strategy: + matrix: + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Check Commit Type + uses: gsactions/commit-message-checker@v1 + #Commit should be like "^Merge pull request #" + with: + pattern: '^Merge pull request #\d' + flags: 'gm' + error: 'This action runs only on PR merges. Check your commit message.' + - uses: actions/checkout@v2 + # Export properties + - name: Setup bintray credentials + env: + BINTRAY_APIKEY: ${{ secrets.BINTRAY_APIKEY }} + run: | + echo "bintray.user=queueitdevs" > ./local.properties + echo "bintray.apiKey=${BINTRAY_APIKEY}" >> ./local.properties + - uses: actions/setup-java@v1 + with: + java-version: 11 + - uses: eskatos/gradle-command-action@v1 + with: + arguments: bintrayUpload \ No newline at end of file diff --git a/.github/workflows/gradle-build.yml b/.github/workflows/gradle-build.yml new file mode 100644 index 0000000..388a247 --- /dev/null +++ b/.github/workflows/gradle-build.yml @@ -0,0 +1,18 @@ +name: Run Gradle Build on Push +on: push +jobs: + gradle: + strategy: + matrix: + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Create local.properties + run: echo "" >> ./local.properties + - uses: actions/setup-java@v1 + with: + java-version: 11 + - uses: eskatos/gradle-command-action@v1 + with: + arguments: build \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..2421e38 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,8 @@ +{ + "files.exclude": { + "**/.classpath": true, + "**/.project": true, + "**/.settings": true, + "**/.factorypath": true + } +} \ No newline at end of file diff --git a/build.gradle b/build.gradle index 8a08ab4..25e6709 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:4.0.0' + classpath 'com.android.tools.build:gradle:4.0.1' classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' diff --git a/demoapp/build.gradle b/demoapp/build.gradle index a38193c..eba20e5 100644 --- a/demoapp/build.gradle +++ b/demoapp/build.gradle @@ -1,13 +1,13 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 23 + compileSdkVersion 26 buildToolsVersion "28.0.3" defaultConfig { applicationId "com.queue_it.shopdemo" minSdkVersion 15 - targetSdkVersion 23 + targetSdkVersion 26 versionCode 1 versionName "1.0" } @@ -20,9 +20,9 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - testCompile 'junit:junit:4.12' - compile 'com.android.support:appcompat-v7:23.4.0' - compile 'com.android.support:design:23.4.0' - compile project(':library') + implementation fileTree(dir: 'libs', include: ['*.jar']) + testImplementation 'junit:junit:4.12' + implementation 'com.android.support:appcompat-v7:26.1.0' + implementation 'com.android.support:design:26.1.0' + implementation project(':library') } diff --git a/demoapp/src/main/java/com/queue_it/shopdemo/MainActivity.java b/demoapp/src/main/java/com/queue_it/shopdemo/MainActivity.java index 5bbea8e..9ce896a 100644 --- a/demoapp/src/main/java/com/queue_it/shopdemo/MainActivity.java +++ b/demoapp/src/main/java/com/queue_it/shopdemo/MainActivity.java @@ -89,6 +89,11 @@ public void onQueueViewWillOpen() { queue_button.setEnabled(true); } + @Override + public void onUserExited() { + Toast.makeText(getApplicationContext(), "onUserExited", Toast.LENGTH_SHORT).show(); + } + @Override public void onQueueDisabled() { showResultActivity("The queue is disabled.", false); @@ -106,6 +111,7 @@ public void onError(Error error, String errorMessage) { showResultActivity("Critical error: " + errorMessage, false); queue_button.setEnabled(true); } + }); try { queueITEngine.run(MainActivity.this, !enableCacheRadioButton.isChecked()); diff --git a/gradlew b/gradlew old mode 100644 new mode 100755 diff --git a/library/build.gradle b/library/build.gradle index 45c182c..8e1e3d9 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'com.android.library' def org = "queueit" android { - compileSdkVersion 23 + compileSdkVersion 26 buildToolsVersion "28.0.3" defaultConfig { minSdkVersion 15 - targetSdkVersion 23 + targetSdkVersion 26 versionCode 1 versionName "2.0.22" } @@ -22,7 +22,7 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' - compile 'com.android.support:appcompat-v7:23.4.0' + compile 'com.android.support:appcompat-v7:26.1.0' compile 'com.squareup.okhttp3:okhttp:3.3.1' } @@ -108,7 +108,7 @@ properties.load(project.rootProject.file('local.properties').newDataInputStream( bintray { user = properties.getProperty("bintray.user") - key = properties.getProperty("bintray.apikey") + key = properties.getProperty("bintray.apiKey") configurations = ['archives'] pkg { diff --git a/library/src/main/AndroidManifest.xml b/library/src/main/AndroidManifest.xml index d4a1faa..ff1ba8f 100644 --- a/library/src/main/AndroidManifest.xml +++ b/library/src/main/AndroidManifest.xml @@ -1,6 +1,7 @@ +