I was integrating an Android game with GameCircle by following Amazon’s documentation, and I eventually arrived to “Initializing GameCircle in Your Game”. The documentation instructs to import GameCircle SDK into Eclipse’s workspace and add it as a dependency. Since I wasn’t using Eclipse, I had to setup the dependency using Ant.
GameCircle SDK looks like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
|
The obvious and easy solution is to merge all these files into my project. It would work, but I would prefer to keep the SDK external to my source tree to make updates easier. It can be done in two easy steps.
Step 1 – Add GameCircle as a reference
In my project, I first added the SDK path to local.properties
:
1
|
|
This file isn’t checked into source control, so it’s a good place to put a
machine-specific path. The path must be relative, because Ant treats /
as
the base of the project and not the root of the file system. Then I referenced
the SDK in project.properties
.
1
|
|
When I tried to compile, I got an error:
1 2 |
|
Step 2 – Prepare GameCircle for Ant
In GameCircle SDK, generate build.xml
:
1
|
|
Still one error remaining:
1 2 |
|
I just created an empty directory named src
, and the project compiled
successfully.
Done! I could continue following the documentation.