23
.github/workflows/android.yml
vendored
Normal file
23
.github/workflows/android.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
name: Android CI
|
||||||
|
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- name: set up JDK 1.8
|
||||||
|
uses: actions/setup-java@v1
|
||||||
|
with:
|
||||||
|
java-version: 1.8
|
||||||
|
- name: Build with Gradle
|
||||||
|
run: chmod 777 ./gradlew && ./gradlew :app:assembleRelease && find app/build/outputs
|
||||||
|
- name: Upload apk
|
||||||
|
uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: app-armeabi-v7a-release-unsigned.apk
|
||||||
|
path: app/build/outputs/apk/common/release/app-common-armeabi-v7a-release-unsigned.apk
|
||||||
|
|
||||||
@@ -27,6 +27,9 @@ android {
|
|||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
}
|
}
|
||||||
|
lintOptions {
|
||||||
|
abortOnError false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
|||||||
@@ -25,23 +25,6 @@ public class ExampleUnitTest {
|
|||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void test() throws IOException {
|
public void test() {
|
||||||
File file = new File("C:\\Users\\Stardust\\Desktop\\1.txt");
|
|
||||||
System.out.println(PFiles.read(file));
|
|
||||||
String url = "http://posttestserver.com/post.php?dir=example";
|
|
||||||
OkHttpClient client = new OkHttpClient();
|
|
||||||
RequestBody formBody = new MultipartBody.Builder()
|
|
||||||
.setType(MultipartBody.FORM)
|
|
||||||
.addFormDataPart("file", file.getName(),
|
|
||||||
RequestBody.create(MediaType.parse("text/plain"), file))
|
|
||||||
.addFormDataPart("other_field", "other_field_value")
|
|
||||||
.build();
|
|
||||||
Request request = new Request.Builder().url(url).post(formBody).build();
|
|
||||||
Response response = client.newCall(request).execute();
|
|
||||||
System.out.println(response.body().string());
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
public boolean equals(int i, int j) {
|
|
||||||
return i == j;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ android {
|
|||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
}
|
}
|
||||||
|
lintOptions {
|
||||||
|
abortOnError false
|
||||||
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
minifyEnabled false
|
minifyEnabled false
|
||||||
|
|||||||
@@ -22,6 +22,9 @@ android {
|
|||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
lintOptions {
|
||||||
|
abortOnError false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ android {
|
|||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
}
|
}
|
||||||
lintOptions {
|
lintOptions {
|
||||||
|
abortOnError false
|
||||||
disable 'MissingTranslation'
|
disable 'MissingTranslation'
|
||||||
disable 'ExtraTranslation'
|
disable 'ExtraTranslation'
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user