This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.sample.crashlogger | |
import android.content.Context | |
import android.os.Environment | |
import android.util.Log | |
import org.apache.commons.io.FileUtils | |
import org.apache.commons.lang.exception.ExceptionUtils | |
import java.io.File | |
import java.io.IOException | |
import java.nio.charset.StandardCharsets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'com.android.library' | |
apply plugin: 'maven-publish' | |
// update these next lines to fit your submodule | |
group = 'com.sample.library' | |
version = '1.0' | |
// Add sources as an artifact | |
task sourceJar(type: Jar) { | |
from android.sourceSets.main.java.srcDirs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task sourceJar(type: Jar) { | |
from android.sourceSets.main.java.srcDirs | |
classifier "source" | |
} | |
android.libraryVariants.all { variant -> | |
variant.outputs.all { output -> | |
println variant.name + " " + output.name | |
publishing.publications.create(variant.name, MavenPublication) { | |
artifact sourceJar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# settings.gradle project 1 | |
include ':submodule-A', ':submodule-B' | |
# settings.gradle project 2 | |
include ':project-1' | |
project(':project-1').projectDir = new File('../relative/path/to/project-1') | |
# build.gradle project 2 submoudle-C | |
dependencies { | |
compile project(':project-1:submodule-A') // Project with path ':project-1:submodule-A' could not be found in project ':project-2' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
connected.setColorFilter( | |
if (device.connected) ContextCompat.getColor(context, R.color.material_green_500) | |
else ContextCompat.getColor(context, R.color.material_grey_500)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../polymer/polymer.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |