Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Francis Toth committed Dec 8, 2014
0 parents commit d734fc3
Show file tree
Hide file tree
Showing 14 changed files with 111 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.buckd
.buckconfig
.DS_Store
.idea
buck-out
37 changes: 37 additions & 0 deletions BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
android_binary(
name = 'app',
manifest = 'src/main/AndroidManifest.xml',
target = 'Google Inc.:Google APIs:19',
keystore = ':debug_keystore',
deps = [
'//third-party:google-play-service',
':res',
':src',
],
)

keystore(
name = 'debug_keystore',
store = 'debug.keystore',
properties = 'debug.keystore.properties',
)

android_resource(
name = 'res',
res = 'src/main/res',
package = 'com.example.myapp',
visibility = [ 'PUBLIC' ],
deps = [
'//third-party:google-play-service',
],
)

android_library(
name = 'src',
srcs = glob(['src/**/*.java']),
deps = [
':res',
'//third-party:google-play-service',
],
exported_deps = ['//third-party:google-play-service']
)
Binary file added debug.keystore
Binary file not shown.
3 changes: 3 additions & 0 deletions debug.keystore.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
key.alias=my_alias
key.store.password=android
key.alias.password=android
20 changes: 20 additions & 0 deletions src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myapp"
android:versionCode="1"
android:versionName="1.0">

<uses-sdk android:minSdkVersion="17"/>
<application
android:label="@string/app_name"
android:icon="@drawable/ic_launcher">
<activity
android:name="MyActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
23 changes: 23 additions & 0 deletions src/main/java/com/example/myapp/MyActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.example.myapp;

import com.google.android.gms.common.api.*;
import com.google.android.gms.drive.*;

import android.app.Activity;
import android.os.Bundle;

public class MyActivity extends Activity {
/**
* Called when the activity is first created.
*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

GoogleApiClient mGoogleApiClient = new GoogleApiClient.Builder(this)
.addApi(Drive.API)
.addScope(Drive.SCOPE_FILE)
.build();
}
}
Binary file added src/main/res/drawable-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/res/drawable-ldpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/res/drawable-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/res/drawable-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions src/main/res/layout/main.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>

<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Hello World, MyActivity2"
/>
</LinearLayout>

4 changes: 4 additions & 0 deletions src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">myapp</string>
</resources>
5 changes: 5 additions & 0 deletions third-party/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
android_prebuilt_aar(
name = 'google-play-service',
aar = 'google-play-services_lib.aar',
visibility = [ 'PUBLIC' ],
)
Binary file added third-party/google-play-services_lib.aar
Binary file not shown.

0 comments on commit d734fc3

Please sign in to comment.