You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-58
Original file line number
Diff line number
Diff line change
@@ -4,71 +4,44 @@ Upload pictures from your Android phone/tablet to Wikimedia Commons.
4
4
5
5
Initially started by the Wikimedia Foundation, this app is now maintained by volunteers. Anyone is welcome to improve it, just choose among the [open issues](https://github.com/nicolas-raoul/apps-android-commons/issues) and send us a pull request :-)
6
6
7
-
## Build Requirements ##
7
+
## Use Android Studio or IntelliJ ##
8
8
9
-
1.[Android SDK][1] (Level 23)
10
-
2.[Maven][2]
9
+
### Import and Compile Commons Android App ##
11
10
12
-
## Build Instructions ##
11
+
[Download Android Studio][1] (recommended) or [IntelliJ][2].
13
12
14
-
1. Set the environment variable `ANDROID_HOME` to be the path to your Android SDK
15
-
2. Run `mvn install` to build
16
-
3. Run `cd commons && mvn android:deploy` to deploy to a device
13
+
1. Clone the repository.
14
+
2. Open Android Studio/IntelliJ. Open the project:
15
+
``File`` > ``Open...``
16
+
or
17
+
(From Quick Start menu): ``Open an existing Android Studio project``
18
+
3. Navigate to the folder in the cloned repository (named commons). Select ``OK``.
17
19
18
-
**Note**: Currently uses a bunch of dependencies that are staged at `yuvi.in/blog/maven`. Will be migrated to either [Maven Central][4] or a Wikimedia staging server soon.
20
+
## Build Manually ##
19
21
20
-
## Set Up IntelliJ or Android Studio for Commons Android App Development ##
22
+
Note: It is much harder to build manually. We reccomend you use Android Studio or IntelliJ IDEA, which both have gradle and all the android tools built in.
21
23
22
-
### Import and Compile Commons Android App##
24
+
### Requirements ###
23
25
24
-
[Download IntelliJ][6] or [Download Android Studio 1.5.2][7]. (Note: The steps below currently only work on Android Studio 1.5.2 and below)
26
+
1.[Android SDK][3] (Level 23)
27
+
2.[Gradle][4]
25
28
26
-
1. Clone the repository.
27
-
2. Open IntelliJ/Android Studio. Tick the box for the Maven Integration plugin by selecting:
6. Tick the boxes ``Search for projects recursively`` and ``Import Maven projects automatically``. Select ``Next``.
38
-
7. Select ``Next``.
39
-
8. Select ``Next``.
40
-
9. Click ``Maven Android API 23 Platform`` or ``Android API 23 Platform`` in the sidebar. Make sure the ``Android SDK home path`` points to the ``/Android/Sdk`` folder. Make sure the ``Java SDK`` is set to 1.8 or higher.
41
-
If there are no options for the ``Java SDK``, click the ``+`` button above the sidebar and select 'JDK'. Navigate to your JDK folder, select it, and hit ``OK``, and then select the newly added JDK.
42
-
Select ``Next``.
43
-
10. Select ``Next``.
44
-
11. Select ``Finish``.
45
-
12. Set the Module SDKs.
46
-
Select the ``Dependencies`` tab on the right pane.
* Tick the boxes for API levels ``14``, ``16``, and ``23`` (or Android ``4.0``, ``4.1.2`` and ``6.0``).
60
-
* Then click ``OK``, and allow it to download the new APIs. Once it has finished, click ``File`` > ``Project Structure`` > ``Project Settings`` > ``Modules``, and repeat step 15.
61
-
13. Select ``commons``. Click the green ``+`` button on the right. Select ``JARs or directories...``. Choose the ``apps-android-commons/lib`` folder. Select ``OK``.
62
-
14. Select ``OK`` to save your changes to the project structre settings.
63
-
15. To test it worked, check if it builds (Select ``commons`` on the projects panel. Select ``Build`` > ``Make Module 'commons'``). If there are no errors (warnings are OK) you're set!
29
+
### Build Instructions ###
30
+
31
+
1. Set the environment variable `ANDROID_HOME` to be the path to your Android SDK
32
+
2. Set the environment variable `JAVA_HOME` to the path to your Java SDK
33
+
3. Run `gradlew.bat assembleRelease` (Windows) or `./gradlew assembleRelease` (Mac / Linux) to build an unisgned apk
34
+
4. From your Android SDK's /tools directory run `adb install path/to/app.apk` (Emulator) or `adb -d install path/to/app.apk` (USB debugging)
35
+
36
+
There are more thorough instructions on the [Android Developers website][5]
64
37
65
38
## License ##
66
39
67
-
This software is licensed under the [Apache License][5].
40
+
This software is licensed under the [Apache License 2.0][6].
68
41
69
42
## Bugs ##
70
43
71
-
Please report any bug [on Github][3].
44
+
Please report any bug [on Github][7].
72
45
73
46
## Code Structure ##
74
47
@@ -111,10 +84,10 @@ Captured files are not currently stored within the app, but are passed by conten
0 commit comments