Skip to content

Commit

Permalink
Renamed maven groupId and package ru.noties - io.noties
Browse files Browse the repository at this point in the history
  • Loading branch information
noties committed Apr 25, 2019
1 parent 0d7e0d1 commit de86f16
Show file tree
Hide file tree
Showing 16 changed files with 57 additions and 48 deletions.
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Debug
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Debug-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1038)
[![Maven Central](https://img.shields.io/maven-central/v/ru.noties/debug.svg)](http://search.maven.org/#search|ga|1|g%3A%22ru.noties%22%20AND%20a%3A%22debug%22)

[![Maven Central](https://img.shields.io/maven-central/v/io.noties/debug.svg)](http://search.maven.org/#search|ga|1|g%3A%22io.noties%22%20AND%20a%3A%22debug%22)

Fast, easy and poweful logging utility for Android and Java.
* Automatic tags based on Java class and method name, easy navigation to that call from IDE console output.
Expand All @@ -25,8 +25,7 @@ Quick peek on live templates:
## Installation
In your `dependencies` block in `build.gradle`:
```gradle
// the core library
compile 'ru.noties:debug:4.0.0'
implementation 'io.noties:debug:5.0.0'
```


Expand All @@ -44,7 +43,7 @@ Debug.init(outputs);

If proguard is used this configuration can be used to remove all the log calls:
```proguard
-assumenosideeffects class ru.noties.debug.Debug {
-assumenosideeffects class io.noties.debug.Debug {
public static *** v(...);
public static *** d(...);
public static *** i(...);
Expand Down Expand Up @@ -104,7 +103,7 @@ Debug.trace(Level level, int maxStack);


## Live templates (IDEA)
There is a file with basic templates: [templates_ru_noties_debug.xml](templates_ru_noties_debug.xml).
There is a file with basic templates: [templates_io_noties_debug.xml](templates_io_noties_debug.xml).

[Learn how to add custom live templates to a IDEA IDE](https://www.jetbrains.com/help/idea/2016.3/live-templates.html)

Expand Down Expand Up @@ -152,7 +151,11 @@ public interface DebugOutput {
```
Just implement `DebugOutput` and pass an instance of it to the `Debug.init` call

## Changes in version 4.0.0
## Changes 5.0.0
* Maven artifact location change: `ru.noties:debug` -> `io.noties:debug`
* Package change `ru.noties.debug` -> `io.noties.debug`

### Changes in version 4.0.0
* Removed `debug-remove` aftifact
* Added nullability annotations where matter
* Overloaded some logging methods to not create an array of arguments with each call
Expand All @@ -168,15 +171,15 @@ Just implement `DebugOutput` and pass an instance of it to the `Debug.init` call
* `ru.noties.debug.out.DebugOutput` -> `ru.noties.debug.DebugOutput`
* `ru.noties.debug.out.AndroidLogDebugOutput` -> `ru.noties.debug.AndroidLogDebugOutput`
* All `Debug.*` calls now accept an array of arguments (previously one would have to create a formatted string for that: `Debug.i("%d, %d, %d, %d", 2, 3, 4, 5);`, now: `Debug.i(2, 3, 4, 5);`
* Added `ru.noties.debug.SystemOutDebugOutput` for writing logs to `System.out` & `System.err` (can be used in plain Java projects, or in test environment)
* Added `io.noties.debug.SystemOutDebugOutput` for writing logs to `System.out` & `System.err` (can be used in plain Java projects, or in test environment)
* Removed Timer
* Removed `library-ui` module (discountinued)
* Removed `apt-compiler` & `apt-annotations` modules (discontinued)

## License

```
Copyright 2017 Dimitry Ivanov (mail@dimitryivanov.ru)
Copyright 2017 Dimitry Ivanov (legal@noties.io)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ org.gradle.configureondemand=true

android.enableBuildCache=true

VERSION_NAME=4.0.0
VERSION_NAME=5.0.0

GROUP=ru.noties
GROUP=io.noties
POM_DESCRIPTION=Library for easy Android logging
POM_URL=https://github.com/noties/Debug
POM_SCM_URL=https://github.com/noties/Debug
Expand Down
2 changes: 1 addition & 1 deletion library/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<manifest package="ru.noties.debug" />
<manifest package="io.noties.debug" />
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.noties.debug;
package io.noties.debug;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.noties.debug;
package io.noties.debug;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
Expand All @@ -8,12 +8,12 @@
import java.util.Locale;
import java.util.regex.Pattern;

import static ru.noties.debug.Level.D;
import static ru.noties.debug.Level.E;
import static ru.noties.debug.Level.I;
import static ru.noties.debug.Level.V;
import static ru.noties.debug.Level.W;
import static ru.noties.debug.Level.WTF;
import static io.noties.debug.Level.D;
import static io.noties.debug.Level.E;
import static io.noties.debug.Level.I;
import static io.noties.debug.Level.V;
import static io.noties.debug.Level.W;
import static io.noties.debug.Level.WTF;

@SuppressWarnings({"WeakerAccess", "SameParameterValue"})
public class Debug {
Expand All @@ -27,7 +27,7 @@ public class Debug {
private static final String STARTING_MESSAGE_PATTERN_LINK = "%1$s(%2$s:%3$d)";
private static final String TRACE_FIRST_LINE = "trace:\n";

private static final String DEFAULT_TAG = "ru.noties.Debug";
private static final String DEFAULT_TAG = "io.noties.Debug";

private DebugOutput output;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.noties.debug;
package io.noties.debug;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.noties.debug;
package io.noties.debug;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.noties.debug;
package io.noties.debug;

public enum Level {
WTF, E, W, I, D, V
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.noties.debug;
package io.noties.debug;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.noties.debug;
package io.noties.debug;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
Expand All @@ -14,6 +14,10 @@
import java.util.List;
import java.util.Locale;

import io.noties.debug.Debug;
import io.noties.debug.DebugOutput;
import io.noties.debug.Level;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
Expand Down
2 changes: 1 addition & 1 deletion sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ android {

defaultConfig {

applicationId "ru.noties.debug.sample"
applicationId "io.noties.debug.sample"
minSdkVersion config['min-sdk']
targetSdkVersion config['target-sdk']
versionCode 1
Expand Down
6 changes: 4 additions & 2 deletions sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ru.noties.debug.sample">
xmlns:tools="http://schemas.android.com/tools"
package="io.noties.debug.sample">

<application
android:name=".MyApplication"
android:allowBackup="true"
android:label="@string/app_name"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme"
tools:ignore="AllowBackup,GoogleAppIndexingWarning,MissingApplicationIcon">

<activity
android:name=".MainActivity"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.noties.debug.sample;
package io.noties.debug.sample;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
Expand All @@ -18,8 +18,8 @@
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;

import ru.noties.debug.DebugOutput;
import ru.noties.debug.Level;
import io.noties.debug.DebugOutput;
import io.noties.debug.Level;

public class FileDebugOutput implements DebugOutput {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package ru.noties.debug.sample;
package io.noties.debug.sample;

import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;

import java.net.UnknownHostException;

import ru.noties.debug.Debug;
import io.noties.debug.Debug;

public class MainActivity extends Activity {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.noties.debug.sample;
package io.noties.debug.sample;

import android.app.Application;

Expand All @@ -7,8 +7,8 @@
import java.io.IOException;
import java.io.Writer;

import ru.noties.debug.AndroidLogDebugOutput;
import ru.noties.debug.Debug;
import io.noties.debug.AndroidLogDebugOutput;
import io.noties.debug.Debug;


public class MyApplication extends Application {
Expand Down
22 changes: 11 additions & 11 deletions templates_ru_noties_debug.xml → templates_io_noties_debug.xml
Original file line number Diff line number Diff line change
@@ -1,64 +1,64 @@
<templateSet group="ru.noties.debug">
<template name="dii" value="ru.noties.debug.Debug.i($VAR$);" description="Debug.i() with methodParameters" toReformat="false" toShortenFQNames="true">
<templateSet group="io.noties.debug">
<template name="dii" value="io.noties.debug.Debug.i($VAR$);" description="Debug.i() with methodParameters" toReformat="false" toShortenFQNames="true">
<variable name="VAR" expression="groovyScript(&quot;def a = _1.collect{ it + \&quot;: %s\&quot;}.join(\&quot;, \&quot;); def b = _1.collect{it}.join(\&quot;, \&quot;); def c = '\&quot;' + a + '\&quot;, ' + b; c&quot;, methodParameters(" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JAVA_EXPRESSION" value="true" />
<option name="COMPLETION" value="false" />
<option name="KOTLIN_EXPRESSION" value="false" />
</context>
</template>
<template name="dv" value="ru.noties.debug.Debug.v($END$);" description="Debug.v()" toReformat="false" toShortenFQNames="true">
<template name="dv" value="io.noties.debug.Debug.v($END$);" description="Debug.v()" toReformat="false" toShortenFQNames="true">
<context>
<option name="JAVA_EXPRESSION" value="true" />
<option name="KOTLIN_EXPRESSION" value="true" />
</context>
</template>
<template name="di" value="ru.noties.debug.Debug.i($END$);" description="Debug.i();" toReformat="false" toShortenFQNames="true">
<template name="di" value="io.noties.debug.Debug.i($END$);" description="Debug.i();" toReformat="false" toShortenFQNames="true">
<context>
<option name="JAVA_EXPRESSION" value="true" />
<option name="KOTLIN_EXPRESSION" value="true" />
</context>
</template>
<template name="de" value="ru.noties.debug.Debug.e($END$);" description="Debug.e();" toReformat="false" toShortenFQNames="true">
<template name="de" value="io.noties.debug.Debug.e($END$);" description="Debug.e();" toReformat="false" toShortenFQNames="true">
<context>
<option name="JAVA_EXPRESSION" value="true" />
<option name="KOTLIN_EXPRESSION" value="true" />
</context>
</template>
<template name="dw" value="ru.noties.debug.Debug.w($END$);" description="Debug.w();" toReformat="false" toShortenFQNames="true">
<template name="dw" value="io.noties.debug.Debug.w($END$);" description="Debug.w();" toReformat="false" toShortenFQNames="true">
<context>
<option name="JAVA_EXPRESSION" value="true" />
<option name="KOTLIN_EXPRESSION" value="true" />
</context>
</template>
<template name="dd" value="ru.noties.debug.Debug.d($END$);" description="Debug.d();" toReformat="false" toShortenFQNames="true">
<template name="dd" value="io.noties.debug.Debug.d($END$);" description="Debug.d();" toReformat="false" toShortenFQNames="true">
<context>
<option name="JAVA_EXPRESSION" value="true" />
<option name="KOTLIN_EXPRESSION" value="true" />
</context>
</template>
<template name="ddd" value="ru.noties.debug.Debug.d($VAR$);" description="Debug.d() with methodParameters" toReformat="false" toShortenFQNames="true">
<template name="ddd" value="io.noties.debug.Debug.d($VAR$);" description="Debug.d() with methodParameters" toReformat="false" toShortenFQNames="true">
<variable name="VAR" expression="groovyScript(&quot;def a = _1.collect{ it + \&quot;: %s\&quot;}.join(\&quot;, \&quot;); def b = _1.collect{it}.join(\&quot;, \&quot;); def c = '\&quot;' + a + '\&quot;, ' + b; c&quot;, methodParameters(" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JAVA_EXPRESSION" value="true" />
<option name="KOTLIN_EXPRESSION" value="false" />
</context>
</template>
<template name="dee" value="ru.noties.debug.Debug.e($VAR$);" description="Debug.e() withMethodParameters" toReformat="false" toShortenFQNames="true">
<template name="dee" value="io.noties.debug.Debug.e($VAR$);" description="Debug.e() withMethodParameters" toReformat="false" toShortenFQNames="true">
<variable name="VAR" expression="groovyScript(&quot;def a = _1.collect{ it + \&quot;: %s\&quot;}.join(\&quot;, \&quot;); def b = _1.collect{it}.join(\&quot;, \&quot;); def c = '\&quot;' + a + '\&quot;, ' + b; c&quot;, methodParameters(" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JAVA_EXPRESSION" value="true" />
<option name="KOTLIN_EXPRESSION" value="false" />
</context>
</template>
<template name="dvv" value="ru.noties.debug.Debug.v($VAR$);" description="Debug.v() with methodParameters" toReformat="false" toShortenFQNames="true">
<template name="dvv" value="io.noties.debug.Debug.v($VAR$);" description="Debug.v() with methodParameters" toReformat="false" toShortenFQNames="true">
<variable name="VAR" expression="groovyScript(&quot;def a = _1.collect{ it + \&quot;: %s\&quot;}.join(\&quot;, \&quot;); def b = _1.collect{it}.join(\&quot;, \&quot;); def c = '\&quot;' + a + '\&quot;, ' + b; c&quot;, methodParameters(" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JAVA_EXPRESSION" value="true" />
<option name="KOTLIN_EXPRESSION" value="false" />
</context>
</template>
<template name="dww" value="ru.noties.debug.Debug.w($VAR$);" description="Debug.w() with methodParameters" toReformat="false" toShortenFQNames="true">
<template name="dww" value="io.noties.debug.Debug.w($VAR$);" description="Debug.w() with methodParameters" toReformat="false" toShortenFQNames="true">
<variable name="VAR" expression="groovyScript(&quot;def a = _1.collect{ it + \&quot;: %s\&quot;}.join(\&quot;, \&quot;); def b = _1.collect{it}.join(\&quot;, \&quot;); def c = '\&quot;' + a + '\&quot;, ' + b; c&quot;, methodParameters(" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JAVA_EXPRESSION" value="true" />
Expand Down

0 comments on commit de86f16

Please sign in to comment.