Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

Commit b1c06ce

Browse files
committed
Initial commit
0 parents  commit b1c06ce

28 files changed

+2433
-0
lines changed

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.settings/org.eclipse.jdt.core.prefs
2+
*/.settings/org.eclipse.jdt.core.prefs
3+
**/bin/*
4+
**/gen/*
5+
**/build/*
6+
**/.idea/*
7+
**/*.iml
8+
.gradle
9+
/local.properties
10+
/.idea/workspace.xml
11+
.DS_Store
12+
.metadata/*
13+
**/*.hprof

LICENSE

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright 2014 Label305 B.V.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.

README.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# AsyncTask-Android
2+
3+
AsyncTask made simpler.
4+
5+
## Set up
6+
7+
Add the following to the dependencies section of your `build.gradle`:
8+
9+
```groovy
10+
compile 'com.label305:asynctask:x.x.x.'
11+
```
12+
13+
## SimpleAsyncTask
14+
15+
Use a `SimpleAsyncTask` when doing work that will not throw a checked `Exception`:
16+
17+
```java
18+
public class MyAsyncTask extends SimpleAsyncTask<String> {
19+
20+
@Override
21+
protected String doInBackgroundSimple() {
22+
return "Test";
23+
}
24+
25+
@Override
26+
protected void onSuccess(final String result) {
27+
// Do something with the result
28+
}
29+
}
30+
```
31+
32+
## AsyncTask
33+
34+
Use an `AsyncTask` when doing work that may throw a checked `Exception`:
35+
36+
```java
37+
public class MyAsyncTask extends AsyncTask<String, IOException> {
38+
39+
@Override
40+
protected String doInBackground() throws IOException {
41+
return myWebservice.getSomeString();
42+
}
43+
44+
@Override
45+
protected void onSuccess(final String result) {
46+
// Do something with the result
47+
}
48+
49+
@Override
50+
protected void onException(final IOException e) {
51+
// Handle IOException
52+
}
53+
54+
}
55+
```
56+
57+
## License
58+
Copyright 2015 Label305 B.V.
59+
60+
Licensed under the Apache License, Version 2.0 (the "License");
61+
you may not use this file except in compliance with the License.
62+
You may obtain a copy of the License at
63+
64+
http://www.apache.org/licenses/LICENSE-2.0
65+
66+
Unless required by applicable law or agreed to in writing, software
67+
distributed under the License is distributed on an "AS IS" BASIS,
68+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
69+
See the License for the specific language governing permissions and
70+
limitations under the License.

RELEASING.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Stan-for-Android Release Process
2+
=================================
3+
4+
1. Make sure it builds!
5+
6+
gradlew clean build
7+
8+
2. Check the version number in the root `gradle.properties`.
9+
3. Make the release!
10+
11+
gradlew clean generateReleaseJavadoc pushMaven -DisRelease=true
12+
13+
4. Promote the Maven artifact on Sonatype's OSS Nexus install.
14+
5. Tag commit as release (`x.x.x`)
15+
6. Provide changelog / `.jar` files at [the Releases page](https://github.com/Label305/Stan-for-Android/releases).
16+
7. Increment the patch version number for future SNAPSHOT releases in the root `gradle.properties`.

asynctask/build.gradle

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
apply plugin: 'com.android.library'
2+
3+
android {
4+
5+
defaultConfig {
6+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
7+
}
8+
9+
testOptions {
10+
unitTests.returnDefaultValues = true
11+
}
12+
}
13+
14+
apply from: rootProject.projectDir.absolutePath + '/gradle/compile.gradle';
15+
apply from: rootProject.projectDir.absolutePath + '/gradle/publishing.gradle'
16+
apply from: rootProject.projectDir.absolutePath + '/gradle/bintray.gradle'
17+
apply from: rootProject.projectDir.absolutePath + '/gradle/artifactory.gradle'
18+
19+
dependencies {
20+
provided 'com.android.support:support-annotations:22.2.1'
21+
22+
/* Tests */
23+
androidTestCompile 'org.mockito:mockito-core:1.10.8'
24+
androidTestCompile 'com.google.dexmaker:dexmaker:1.2'
25+
androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2'
26+
27+
androidTestCompile 'com.android.support.test:runner:0.3'
28+
androidTestCompile 'com.android.support.test:rules:0.3'
29+
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2'
30+
}

asynctask/gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
POM_NAME=AsyncTask
2+
POM_ARTIFACT_ID=asynctask
3+
POM_PACKAGING=aar

asynctask/libs/dexmaker-1.1.jar

659 KB
Binary file not shown.
12.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)