-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
071c2fb
commit 29cb6dd
Showing
7 changed files
with
129 additions
and
57 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Android CI Debug | ||
|
||
on: | ||
pull_request: | ||
push: | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/[email protected] | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
|
||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Build with Gradle | ||
run: ./gradlew assembleDebug | ||
|
||
- name: Upload Debug apk | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: apk-debug | ||
path: app/build/outputs/apk/debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/app/build | ||
/.gradle | ||
/local.properties | ||
/local.properties | ||
/push.sh |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package thercn.wmw; | ||
|
||
import android.app.Activity; | ||
import android.util.Log; | ||
import java.io.File; | ||
import java.io.FileOutputStream; | ||
import java.io.IOException; | ||
import java.io.InputStream; | ||
|
||
public class AppUtils { | ||
public static void ExportAssets(Activity activity, String outPath, | ||
String fileName) { | ||
File outdir = new File(outPath); | ||
if (!outdir.exists()) { | ||
outdir.mkdirs(); | ||
} | ||
try { | ||
InputStream inputStream = activity.getAssets().open(fileName); | ||
File outFile = new File(outdir, fileName); | ||
if (outFile.exists()) { | ||
return; | ||
} | ||
FileOutputStream fileOutputStream = new FileOutputStream(outFile); | ||
byte[] buffer = new byte[1024]; | ||
int byteRead; | ||
while (-1 != (byteRead = inputStream.read(buffer))) { | ||
fileOutputStream.write(buffer, 0, byteRead); | ||
} | ||
inputStream.close(); | ||
fileOutputStream.flush(); | ||
fileOutputStream.close(); | ||
} catch (IOException e) { | ||
Log.e("WMW", "", e); | ||
} | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters