Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit afe47bcd authored by Luis Vidal's avatar Luis Vidal
Browse files

Refactor OpenWeatherMap weather provider service

An attempt to improve the legacy code that was originally
ported from LockClock

Change-Id: If04ecaceef66c7c9af14a1710f5d66ea314b3f7c
parent f471c4c3
Loading
Loading
Loading
Loading

.gitignore

0 → 100644
+43 −0
Original line number Diff line number Diff line
# built application files
*.apk
*.ap_

# files for the dex VM
*.dex

# Java class files
*.class

# generated files
bin/
gen/
out/
build/

# Local configuration file (sdk path, etc)
local.properties

# Eclipse project files
.classpath
.project

# Windows thumbnail db
.DS_Store

# IDEA/Android Studio project files, because
# the project can be imported from settings.gradle
.idea
*.iml

# Old-style IDEA project files
*.ipr
*.iws

# Local IDEA workspace
.idea/workspace.xml

# Gradle cache
.gradle

# Sandbox stuff
_sandbox

Android.mk

deleted100644 → 0
+0 −27
Original line number Diff line number Diff line
#
# Copyright (C) 2016 The CyanogenMod Project
#
# 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.
#

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

LOCAL_PACKAGE_NAME := OpenWeatherMapProvider
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_MODULE_TAGS := optional

LOCAL_STATIC_JAVA_LIBRARIES := \
    org.cyanogenmod.platform.sdk

include $(BUILD_PACKAGE)
 No newline at end of file

app/.gitignore

0 → 100644
+1 −0
Original line number Diff line number Diff line
/build

app/build.gradle

0 → 100644
+32 −0
Original line number Diff line number Diff line
apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "org.cyanogenmod.openweathermapprovider"
        minSdkVersion 23
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    packagingOptions {
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
    }
}

dependencies {
    compile 'org.cyanogenmod:platform.sdk:5.+'
    compile 'com.google.code.gson:gson:2.6.1'
    compile 'com.squareup.retrofit2:retrofit:2.0.1'
    compile 'com.squareup.retrofit2:converter-gson:2.0.1'
    compile 'com.squareup.okhttp3:okhttp:3.2.0'
}

app/proguard-rules.pro

0 → 100644
+17 −0
Original line number Diff line number Diff line
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/lvidal/Library/Android/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}
Loading