Skip to content

Commit

Permalink
Merge pull request #8 from ppalaga/150615-minimal-checks
Browse files Browse the repository at this point in the history
License headers fixed or added using mvn license:format
  • Loading branch information
ming13 committed Jun 11, 2015
2 parents fda7b7c + 13c52e0 commit ca10081
Show file tree
Hide file tree
Showing 28 changed files with 1,085 additions and 567 deletions.
11 changes: 8 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
# Android SDK

local.properties

# Android Studio

.idea/
*.iml

# Gradle
# Eclipse
.project
.classpath
.settings

# Gradle
.gradle/
build/

# Maven
/target/
93 changes: 93 additions & 0 deletions .travis.maven.settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<!--
Copyright 2015 Red Hat, Inc. and/or its affiliates
and other contributors as indicated by the @author tags.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">

<interactiveMode>false</interactiveMode>

<profiles>
<profile>
<id>securecentral</id>
<!--Override the repository (and pluginRepository) "central" from the
Maven Super POM -->
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
</profile>
<profile>
<id>jboss-public-repository</id>
<repositories>
<repository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Maven Repository Group</name>
<url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Maven Repository Group</name>
<url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>

<activeProfiles>
<activeProfile>securecentral</activeProfile>
<activeProfile>jboss-public-repository</activeProfile>
</activeProfiles>

</settings>

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ android:
- extra-android-m2repository

script:
- ./gradlew clean assembleDebug
- mvn -s .travis.maven.settings.xml license:check checkstyle:check && ./gradlew clean assembleDebug
16 changes: 16 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2015 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
buildscript {
repositories {
mavenCentral()
Expand Down
17 changes: 17 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
# Copyright 2015 Red Hat, Inc. and/or its affiliates
# and other contributors as indicated by the @author tags.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

#Sun May 24 23:31:53 MSK 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
Expand Down
94 changes: 94 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2015 Red Hat, Inc. and/or its affiliates
and other contributors as indicated by the @author tags.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<!--
Note that this is a Gradle based project.
The sole purpose of this pom.xml file is to enforce code style and license headers in source files.
-->

<parent>
<groupId>org.hawkular</groupId>
<artifactId>hawkular-parent</artifactId>
<version>15</version>
</parent>

<groupId>org.hawkular.client.android</groupId>
<artifactId>hawkular-android-client</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>

<name>Hawkular Android Client</name>
<description>Hawkular Mobile Application for Android</description>
<url>https://github.com/hawkular/android-client</url>
<inceptionYear>2015</inceptionYear>
<organization>
<name>Red Hat, Inc.</name>
<url>http://redhat.com/</url>
</organization>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<distribution>repo</distribution>
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
</license>
</licenses>

<mailingLists>
<mailingList>
<name>Hawkular Developer List</name>
<subscribe>https://lists.jboss.org/mailman/listinfo/hawkular-dev</subscribe>
<unsubscribe>https://lists.jboss.org/mailman/listinfo/hawkular-dev</unsubscribe>
<archive>http://lists.jboss.org/pipermail/hawkular-dev</archive>
</mailingList>
</mailingLists>

<scm>
<connection>scm:git:git@github.com:hawkular/hawkular-alerts.git</connection>
<developerConnection>scm:git:git@github.com:hawkular/hawkular-alerts.git</developerConnection>
<url>https://github.com/hawkular/hawkular-alerts</url>
<tag>head</tag>
</scm>
<issueManagement>
<url>https://issues.jboss.org/browse/HAWKULAR</url>
<system>jira</system>
</issueManagement>

<build>
<plugins>
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<configuration>
<excludes combine.children="append">
<exclude>build/</exclude>
<exclude>.gradle/</exclude>
<exclude>gradlew</exclude>
<exclude>gradlew.bat</exclude>
<exclude>local.properties</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>

</project>
59 changes: 34 additions & 25 deletions src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,36 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.hawkular.client.android"
android:installLocation="auto">
<!--
<uses-permission
android:name="android.permission.INTERNET"/>
Copyright 2015 Red Hat, Inc. and/or its affiliates
and other contributors as indicated by the @author tags.
<application
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:name=".HawkularApplication"
android:label="@string/application_name"
android:theme="@style/Theme.Hawkular">
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
<activity
android:name=".activity.LauncherActivity">
http://www.apache.org/licenses/LICENSE-2.0
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
</activity>
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.hawkular.client.android"
android:installLocation="auto">

<activity
android:name=".activity.ResourceTypesActivity">
</activity>
<uses-permission android:name="android.permission.INTERNET" />

<service
android:name="org.jboss.aerogear.android.authorization.oauth2.OAuth2AuthzService">
</service>
<application android:allowBackup="false" android:icon="@mipmap/ic_launcher" android:name=".HawkularApplication"
android:label="@string/application_name" android:theme="@style/Theme.Hawkular">

</application>
<activity android:name=".activity.LauncherActivity">

<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

</activity>

<activity android:name=".activity.ResourceTypesActivity">
</activity>

<service android:name="org.jboss.aerogear.android.authorization.oauth2.OAuth2AuthzService">
</service>

</application>

</manifest>
51 changes: 33 additions & 18 deletions src/main/java/org/hawkular/client/android/HawkularApplication.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2015 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.client.android;

import android.app.Application;
Expand All @@ -7,25 +23,24 @@

import timber.log.Timber;

public class HawkularApplication extends Application
{
@Override
public void onCreate() {
super.onCreate();
public class HawkularApplication extends Application {
@Override
public void onCreate() {
super.onCreate();

setUpLogging();
setUpDetections();
}
setUpLogging();
setUpDetections();
}

private void setUpLogging() {
if (Android.isDebugging()) {
Timber.plant(new Timber.DebugTree());
}
}
private void setUpLogging() {
if (Android.isDebugging()) {
Timber.plant(new Timber.DebugTree());
}
}

private void setUpDetections() {
if (Android.isDebugging()) {
StrictMode.enableDefaults();
}
}
private void setUpDetections() {
if (Android.isDebugging()) {
StrictMode.enableDefaults();
}
}
}

0 comments on commit ca10081

Please sign in to comment.