From bcc9c0fa2f981104529a0d5e1663d5966d9d4c34 Mon Sep 17 00:00:00 2001 From: Karn Saheb Date: Wed, 2 Jan 2019 11:37:14 -0500 Subject: [PATCH 1/7] Updated project files with license. --- README.md | 1 + library/build.gradle | 24 +++++++++++++++++++ library/src/main/AndroidManifest.xml | 24 +++++++++++++++++++ .../src/main/java/io/karn/notify/Notify.kt | 24 +++++++++++++++++++ .../main/java/io/karn/notify/NotifyCreator.kt | 24 +++++++++++++++++++ .../io/karn/notify/entities/NotifyConfig.kt | 24 +++++++++++++++++++ .../java/io/karn/notify/entities/Payload.kt | 24 +++++++++++++++++++ .../internal/NotificationChannelInterop.kt | 24 +++++++++++++++++++ .../notify/internal/NotificationInterop.kt | 24 +++++++++++++++++++ .../io/karn/notify/internal/NotifyExtender.kt | 24 +++++++++++++++++++ .../karn/notify/internal/RawNotification.kt | 24 +++++++++++++++++++ .../io/karn/notify/internal/utils/Aliases.kt | 24 +++++++++++++++++++ .../karn/notify/internal/utils/Annotations.kt | 24 +++++++++++++++++++ .../io/karn/notify/internal/utils/Errors.kt | 24 +++++++++++++++++++ .../io/karn/notify/internal/utils/Utils.kt | 24 +++++++++++++++++++ .../main/res/drawable/ic_android_black.xml | 24 +++++++++++++++++++ library/src/main/res/drawable/ic_app_icon.xml | 24 +++++++++++++++++++ .../notify/NotificationChannelInteropTest.kt | 24 +++++++++++++++++++ .../karn/notify/NotificationInterlopTest.kt | 24 +++++++++++++++++++ .../java/io/karn/notify/NotifyActionsTest.kt | 24 +++++++++++++++++++ .../java/io/karn/notify/NotifyAlertingTest.kt | 24 +++++++++++++++++++ .../java/io/karn/notify/NotifyContentTest.kt | 24 +++++++++++++++++++ .../java/io/karn/notify/NotifyHeaderTest.kt | 24 +++++++++++++++++++ .../java/io/karn/notify/NotifyMetaTest.kt | 24 +++++++++++++++++++ .../io/karn/notify/NotifyStackableTest.kt | 24 +++++++++++++++++++ .../test/java/io/karn/notify/NotifyTest.kt | 24 +++++++++++++++++++ .../java/io/karn/notify/NotifyTestBase.kt | 24 +++++++++++++++++++ sample/build.gradle | 24 +++++++++++++++++++ sample/src/main/AndroidManifest.xml | 24 +++++++++++++++++++ .../main/java/presentation/MainActivity.kt | 24 +++++++++++++++++++ .../drawable-v21/default_button_filled.xml | 24 +++++++++++++++++++ .../drawable-v21/default_button_outline.xml | 24 +++++++++++++++++++ .../res/drawable/default_button_filled.xml | 24 +++++++++++++++++++ .../res/drawable/default_button_outline.xml | 24 +++++++++++++++++++ .../src/main/res/drawable/ic_notify_logo.xml | 24 +++++++++++++++++++ sample/src/main/res/layout/activity_main.xml | 24 +++++++++++++++++++ sample/src/main/res/values/colors.xml | 24 +++++++++++++++++++ sample/src/main/res/values/strings.xml | 24 +++++++++++++++++++ sample/src/main/res/values/styles.xml | 24 +++++++++++++++++++ 39 files changed, 913 insertions(+) diff --git a/README.md b/README.md index a74ca1e..58aba92 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ Simplified notification construction for Android. [![Codecov](https://img.shields.io/codecov/c/github/karn/notify.svg?style=flat-square)](https://codecov.io/gh/Karn/notify) [![GitHub (pre-)release](https://img.shields.io/github/release/karn/notify/all.svg?style=flat-square) ](./../../releases) +[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FKarn%2Fnotify.svg?type=small)](https://app.fossa.io/projects/git%2Bgithub.com%2FKarn%2Fnotify?ref=badge_small) Notify is a Fluent API for Android notifications which lets you build notifications without worrying how they'll look across devices or API versions. You can bring deterministic notifications to your Android projects with clarity & ease so you can finally stop fighting Developer documentation and get back to dev work that really matters. diff --git a/library/build.gradle b/library/build.gradle index 4618265..db5cbca 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2018 Karn Saheb + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + // Top-level build file where you can add configuration options common to all sub-projects/modules. apply plugin: 'com.android.library' apply plugin: 'kotlin-android' diff --git a/library/src/main/AndroidManifest.xml b/library/src/main/AndroidManifest.xml index 7954e12..38f5282 100644 --- a/library/src/main/AndroidManifest.xml +++ b/library/src/main/AndroidManifest.xml @@ -1,4 +1,28 @@ + + diff --git a/library/src/main/java/io/karn/notify/Notify.kt b/library/src/main/java/io/karn/notify/Notify.kt index 541c12d..0dff4b8 100644 --- a/library/src/main/java/io/karn/notify/Notify.kt +++ b/library/src/main/java/io/karn/notify/Notify.kt @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2018 Karn Saheb + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package io.karn.notify import android.app.NotificationManager diff --git a/library/src/main/java/io/karn/notify/NotifyCreator.kt b/library/src/main/java/io/karn/notify/NotifyCreator.kt index 7530fe6..b40c541 100644 --- a/library/src/main/java/io/karn/notify/NotifyCreator.kt +++ b/library/src/main/java/io/karn/notify/NotifyCreator.kt @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2018 Karn Saheb + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package io.karn.notify import androidx.core.app.NotificationCompat diff --git a/library/src/main/java/io/karn/notify/entities/NotifyConfig.kt b/library/src/main/java/io/karn/notify/entities/NotifyConfig.kt index e062737..41d1d9e 100644 --- a/library/src/main/java/io/karn/notify/entities/NotifyConfig.kt +++ b/library/src/main/java/io/karn/notify/entities/NotifyConfig.kt @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2018 Karn Saheb + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package io.karn.notify.entities import android.app.NotificationManager diff --git a/library/src/main/java/io/karn/notify/entities/Payload.kt b/library/src/main/java/io/karn/notify/entities/Payload.kt index 7e99967..1ed87ce 100644 --- a/library/src/main/java/io/karn/notify/entities/Payload.kt +++ b/library/src/main/java/io/karn/notify/entities/Payload.kt @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2018 Karn Saheb + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package io.karn.notify.entities import android.app.PendingIntent diff --git a/library/src/main/java/io/karn/notify/internal/NotificationChannelInterop.kt b/library/src/main/java/io/karn/notify/internal/NotificationChannelInterop.kt index 0c2eee2..89e7de6 100644 --- a/library/src/main/java/io/karn/notify/internal/NotificationChannelInterop.kt +++ b/library/src/main/java/io/karn/notify/internal/NotificationChannelInterop.kt @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2018 Karn Saheb + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package io.karn.notify.internal import android.annotation.SuppressLint diff --git a/library/src/main/java/io/karn/notify/internal/NotificationInterop.kt b/library/src/main/java/io/karn/notify/internal/NotificationInterop.kt index b07ef1b..dfe66b2 100644 --- a/library/src/main/java/io/karn/notify/internal/NotificationInterop.kt +++ b/library/src/main/java/io/karn/notify/internal/NotificationInterop.kt @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2018 Karn Saheb + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package io.karn.notify.internal import android.app.NotificationManager diff --git a/library/src/main/java/io/karn/notify/internal/NotifyExtender.kt b/library/src/main/java/io/karn/notify/internal/NotifyExtender.kt index 662ab35..374c084 100644 --- a/library/src/main/java/io/karn/notify/internal/NotifyExtender.kt +++ b/library/src/main/java/io/karn/notify/internal/NotifyExtender.kt @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2018 Karn Saheb + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package io.karn.notify.internal import android.os.Bundle diff --git a/library/src/main/java/io/karn/notify/internal/RawNotification.kt b/library/src/main/java/io/karn/notify/internal/RawNotification.kt index 574acb6..7fc6144 100644 --- a/library/src/main/java/io/karn/notify/internal/RawNotification.kt +++ b/library/src/main/java/io/karn/notify/internal/RawNotification.kt @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2018 Karn Saheb + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package io.karn.notify.internal import io.karn.notify.entities.Payload diff --git a/library/src/main/java/io/karn/notify/internal/utils/Aliases.kt b/library/src/main/java/io/karn/notify/internal/utils/Aliases.kt index 51c9a03..5a85262 100644 --- a/library/src/main/java/io/karn/notify/internal/utils/Aliases.kt +++ b/library/src/main/java/io/karn/notify/internal/utils/Aliases.kt @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2018 Karn Saheb + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package io.karn.notify.internal.utils import androidx.core.app.NotificationCompat diff --git a/library/src/main/java/io/karn/notify/internal/utils/Annotations.kt b/library/src/main/java/io/karn/notify/internal/utils/Annotations.kt index 1b40ef7..411a409 100644 --- a/library/src/main/java/io/karn/notify/internal/utils/Annotations.kt +++ b/library/src/main/java/io/karn/notify/internal/utils/Annotations.kt @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2018 Karn Saheb + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package io.karn.notify.internal.utils import androidx.annotation.IntDef diff --git a/library/src/main/java/io/karn/notify/internal/utils/Errors.kt b/library/src/main/java/io/karn/notify/internal/utils/Errors.kt index ae3f47b..f42dea2 100644 --- a/library/src/main/java/io/karn/notify/internal/utils/Errors.kt +++ b/library/src/main/java/io/karn/notify/internal/utils/Errors.kt @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2018 Karn Saheb + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package io.karn.notify.internal.utils internal object Errors { diff --git a/library/src/main/java/io/karn/notify/internal/utils/Utils.kt b/library/src/main/java/io/karn/notify/internal/utils/Utils.kt index 2e26d38..62b341c 100644 --- a/library/src/main/java/io/karn/notify/internal/utils/Utils.kt +++ b/library/src/main/java/io/karn/notify/internal/utils/Utils.kt @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2018 Karn Saheb + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package io.karn.notify.internal.utils import android.text.Html diff --git a/library/src/main/res/drawable/ic_android_black.xml b/library/src/main/res/drawable/ic_android_black.xml index 401cbf6..3421298 100644 --- a/library/src/main/res/drawable/ic_android_black.xml +++ b/library/src/main/res/drawable/ic_android_black.xml @@ -1,3 +1,27 @@ + + + if (task.name.equals("lint") || task.name.contains("Test")) { diff --git a/sample/src/main/AndroidManifest.xml b/sample/src/main/AndroidManifest.xml index 2752484..2547d4c 100644 --- a/sample/src/main/AndroidManifest.xml +++ b/sample/src/main/AndroidManifest.xml @@ -1,4 +1,28 @@ + + diff --git a/sample/src/main/java/presentation/MainActivity.kt b/sample/src/main/java/presentation/MainActivity.kt index 596405c..955eef5 100644 --- a/sample/src/main/java/presentation/MainActivity.kt +++ b/sample/src/main/java/presentation/MainActivity.kt @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2018 Karn Saheb + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package presentation import android.graphics.BitmapFactory diff --git a/sample/src/main/res/drawable-v21/default_button_filled.xml b/sample/src/main/res/drawable-v21/default_button_filled.xml index e96b949..71f6b8f 100644 --- a/sample/src/main/res/drawable-v21/default_button_filled.xml +++ b/sample/src/main/res/drawable-v21/default_button_filled.xml @@ -1,4 +1,28 @@ + + diff --git a/sample/src/main/res/drawable-v21/default_button_outline.xml b/sample/src/main/res/drawable-v21/default_button_outline.xml index cfd1925..5990b0b 100644 --- a/sample/src/main/res/drawable-v21/default_button_outline.xml +++ b/sample/src/main/res/drawable-v21/default_button_outline.xml @@ -1,4 +1,28 @@ + + diff --git a/sample/src/main/res/drawable/default_button_filled.xml b/sample/src/main/res/drawable/default_button_filled.xml index 518ee05..14c5b2e 100644 --- a/sample/src/main/res/drawable/default_button_filled.xml +++ b/sample/src/main/res/drawable/default_button_filled.xml @@ -1,4 +1,28 @@ + + diff --git a/sample/src/main/res/drawable/default_button_outline.xml b/sample/src/main/res/drawable/default_button_outline.xml index 7697d2e..80bd2b3 100644 --- a/sample/src/main/res/drawable/default_button_outline.xml +++ b/sample/src/main/res/drawable/default_button_outline.xml @@ -1,4 +1,28 @@ + + diff --git a/sample/src/main/res/drawable/ic_notify_logo.xml b/sample/src/main/res/drawable/ic_notify_logo.xml index de9dcd3..1489c56 100644 --- a/sample/src/main/res/drawable/ic_notify_logo.xml +++ b/sample/src/main/res/drawable/ic_notify_logo.xml @@ -1,3 +1,27 @@ + + + + + + #4A90E2 #326299 diff --git a/sample/src/main/res/values/strings.xml b/sample/src/main/res/values/strings.xml index 05cf1ad..03c3072 100644 --- a/sample/src/main/res/values/strings.xml +++ b/sample/src/main/res/values/strings.xml @@ -1,3 +1,27 @@ + + Notify diff --git a/sample/src/main/res/values/styles.xml b/sample/src/main/res/values/styles.xml index e5b67d5..1e71fa3 100644 --- a/sample/src/main/res/values/styles.xml +++ b/sample/src/main/res/values/styles.xml @@ -1,3 +1,27 @@ + + From 21bb50db9244fe6746ea54b045d24ddf183a57c6 Mon Sep 17 00:00:00 2001 From: Karn Saheb Date: Thu, 3 Jan 2019 21:01:02 -0500 Subject: [PATCH 2/7] Explicitly identify 'context' in Advanced Usage documentation. The documentation was using 'this' when referring to the context, however this is not very clear and as a result has been updated to explicitly name 'context' as the available context. --- docs/advanced.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/advanced.md b/docs/advanced.md index cdd0cb2..468a368 100644 --- a/docs/advanced.md +++ b/docs/advanced.md @@ -61,9 +61,9 @@ Notify // The text corresponding to the action -- this is what shows . "Clear", // Swap this PendingIntent for whatever Intent is to be processed when the action is clicked. - PendingIntent.getService(this@MainActivity, + PendingIntent.getService(context, 0, - Intent(this@MainActivity, MyNotificationService::class.java) + Intent(context, MyNotificationService::class.java) .putExtra("action", "clear_badges"), 0) )) @@ -79,7 +79,7 @@ This is a particularly effective method of reducing the clutter of the notificat ```Kotlin Notify - .with(this) + .with(context) .content { // this: Payload.Content.Default title = "New dessert menu" text = "The Cheesecake Factory has a new dessert for you to try!" From 9806212b94fcdd8e5fd45965d6ecff741c7e467e Mon Sep 17 00:00:00 2001 From: Karn Saheb Date: Thu, 3 Jan 2019 21:05:58 -0500 Subject: [PATCH 3/7] Explicitly identify 'context' in Advanced Usage documentation. This commit updates reference to 'this' for context explicitly to 'context'. Note to self: make sure to save when you're done making changes. :'( --- docs/advanced.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/advanced.md b/docs/advanced.md index 468a368..79a2970 100644 --- a/docs/advanced.md +++ b/docs/advanced.md @@ -24,14 +24,14 @@ Notify .with(context) .meta { // this: Payload.Meta // Launch the MainActivity once the notification is clicked. - clickIntent = PendingIntent.getActivity(this@MainActivity, + clickIntent = PendingIntent.getActivity(context, 0, - Intent(this@MainActivity, MainActivity::class.java), + Intent(context, MainActivity::class.java), 0) // Start a service which clears the badge count once the notification is dismissed. - clearIntent = PendingIntent.getService(this@MainActivity, + clearIntent = PendingIntent.getService(context, 0, - Intent(this@MainActivity, MyNotificationService::class.java) + Intent(context, MyNotificationService::class.java) .putExtra("action", "clear_badges"), 0) } From 9413755b51f7f0a24a7778e53ced36a3ccba49aa Mon Sep 17 00:00:00 2001 From: Karn Saheb Date: Sat, 5 Jan 2019 09:37:57 -0500 Subject: [PATCH 4/7] Remove defaultConfig constructor arg. from NotifyCreator The constructor argument can instead be accessed directly from the companion object of the Notify class. --- library/src/main/java/io/karn/notify/Notify.kt | 2 +- library/src/main/java/io/karn/notify/NotifyCreator.kt | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/library/src/main/java/io/karn/notify/Notify.kt b/library/src/main/java/io/karn/notify/Notify.kt index 0dff4b8..60c7976 100644 --- a/library/src/main/java/io/karn/notify/Notify.kt +++ b/library/src/main/java/io/karn/notify/Notify.kt @@ -100,7 +100,7 @@ class Notify internal constructor(internal var context: Context) { * {@see Notify#defaultConfig((NotifyConfig) -> Unit)}. */ fun with(context: Context): NotifyCreator { - return NotifyCreator(Notify(context), defaultConfig) + return NotifyCreator(Notify(context)) } /** diff --git a/library/src/main/java/io/karn/notify/NotifyCreator.kt b/library/src/main/java/io/karn/notify/NotifyCreator.kt index b40c541..dea3ccb 100644 --- a/library/src/main/java/io/karn/notify/NotifyCreator.kt +++ b/library/src/main/java/io/karn/notify/NotifyCreator.kt @@ -25,7 +25,6 @@ package io.karn.notify import androidx.core.app.NotificationCompat -import io.karn.notify.entities.NotifyConfig import io.karn.notify.entities.Payload import io.karn.notify.internal.RawNotification import io.karn.notify.internal.utils.Action @@ -36,11 +35,11 @@ import io.karn.notify.internal.utils.NotifyScopeMarker * Fluent API for creating a Notification object. */ @NotifyScopeMarker -class NotifyCreator internal constructor(private val notify: Notify, config: NotifyConfig = NotifyConfig()) { +class NotifyCreator internal constructor(private val notify: Notify) { private var meta = Payload.Meta() - private var alerts = config.defaultAlerting - private var header = config.defaultHeader.copy() + private var alerts = Notify.defaultConfig.defaultAlerting + private var header = Notify.defaultConfig.defaultHeader.copy() private var content: Payload.Content = Payload.Content.Default() private var actions: ArrayList? = null private var stackable: Payload.Stackable? = null From 80f29b46b74839a2f46e20ba0a1b6fa98a34b858 Mon Sep 17 00:00:00 2001 From: Karn Saheb Date: Sat, 23 Mar 2019 19:04:01 -0400 Subject: [PATCH 5/7] Fix license text location. --- sample/build.gradle | 48 ++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/sample/build.gradle b/sample/build.gradle index 76fe906..527d3c3 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2018 Karn Saheb + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' @@ -28,30 +52,6 @@ dependencies { implementation project(path: ':library') } -/* - * MIT License - * - * Copyright (c) 2018 Karn Saheb - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - // Skip teting and linting. tasks.whenTaskAdded { task -> if (task.name.equals("lint") || task.name.contains("Test")) { From 1230a297346fb982a569b8a14362d89a73154a40 Mon Sep 17 00:00:00 2001 From: Karn Saheb Date: Tue, 26 Mar 2019 10:43:25 -0400 Subject: [PATCH 6/7] Fix reclassification of notifications when sound/vibration is set. (#32) - The setting of sound and vibration configuration has been wrapped in a conditional which guards on the importance of the notification to prevent misclassification of priority on some platforms. - Fix an issue with setting of importance on channels which was previously assigned importance which was one lower than the expected importance. --- .../java/io/karn/notify/entities/Payload.kt | 6 ++-- .../internal/NotificationChannelInterop.kt | 2 +- .../notify/internal/NotificationInterop.kt | 33 ++++++++++++------- .../java/io/karn/notify/NotifyAlertingTest.kt | 4 +-- .../test/java/io/karn/notify/NotifyTest.kt | 2 +- 5 files changed, 30 insertions(+), 17 deletions(-) diff --git a/library/src/main/java/io/karn/notify/entities/Payload.kt b/library/src/main/java/io/karn/notify/entities/Payload.kt index 1ed87ce..bace5ae 100644 --- a/library/src/main/java/io/karn/notify/entities/Payload.kt +++ b/library/src/main/java/io/karn/notify/entities/Payload.kt @@ -132,11 +132,13 @@ sealed class Payload { */ @ColorInt var lightColor: Int = Notify.NO_LIGHTS, /** - * Vibration pattern for notification on this notifyChannel. + * Vibration pattern for notification on this notifyChannel. This is only set on + * notifications with importance that is at least [Notify.IMPORTANCE_NORMAL] or higher. */ var vibrationPattern: List = ArrayList(), /** - * A custom notification sound if any. + * A custom notification sound if any. This is only set on notifications with importance + * that is at least [Notify.IMPORTANCE_NORMAL] or higher. */ var sound: Uri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION) ) diff --git a/library/src/main/java/io/karn/notify/internal/NotificationChannelInterop.kt b/library/src/main/java/io/karn/notify/internal/NotificationChannelInterop.kt index 89e7de6..38d5eed 100644 --- a/library/src/main/java/io/karn/notify/internal/NotificationChannelInterop.kt +++ b/library/src/main/java/io/karn/notify/internal/NotificationChannelInterop.kt @@ -49,7 +49,7 @@ internal object NotificationChannelInterop { // Create the NotificationChannel, but only on API 26+ because // the NotificationChannel class is new and not in the support library - val channel = NotificationChannel(alerting.channelKey, alerting.channelName, alerting.channelImportance + 2).apply { + val channel = NotificationChannel(alerting.channelKey, alerting.channelName, alerting.channelImportance + 3).apply { description = alerting.channelDescription // Set the lockscreen visibility. diff --git a/library/src/main/java/io/karn/notify/internal/NotificationInterop.kt b/library/src/main/java/io/karn/notify/internal/NotificationInterop.kt index dfe66b2..c43148e 100644 --- a/library/src/main/java/io/karn/notify/internal/NotificationInterop.kt +++ b/library/src/main/java/io/karn/notify/internal/NotificationInterop.kt @@ -171,7 +171,7 @@ internal object NotificationInterop { // Attach alerting options. payload.alerting.apply { - // Register the default alerting. + // Register the default alerting. Applies channel configuration on API >= 26. NotificationChannelInterop.with(this) // The visibility of the notification on the lockscreen. @@ -182,18 +182,29 @@ internal object NotificationInterop { builder.setLights(lightColor, 500, 2000) } - // The vibration pattern. - vibrationPattern - .takeIf { it.isNotEmpty() } - ?.also { - builder.setVibrate(it.toLongArray()) - } + // Manual specification of the priority. According to the documentation, this is only + // one of the factors that affect the notifications priority and that this behaviour may + // differ on different platforms. + // It seems that the priority is also affected by the sound that is set for the + // notification as such we'll wrap the behaviour of the sound and also of the vibration + // to prevent the notification from being reclassified to a different priority. + // This doesn't seem to be the case for API >= 26, however, a future PR should tackle + // API nuances and ensure that behaviour has been tested. + // TODO: Test API nuances. + builder.priority = channelImportance - // A custom alerting sound. - builder.setSound(sound) + // If the notification's importance is normal or greater then we configure + if (channelImportance >= Notify.IMPORTANCE_NORMAL) { + // The vibration pattern. + vibrationPattern + .takeIf { it.isNotEmpty() } + ?.also { + builder.setVibrate(it.toLongArray()) + } - // Manual specification of the priority. - builder.priority = channelImportance + // A custom alerting sound. + builder.setSound(sound) + } } var style: NotificationCompat.Style? = null diff --git a/library/src/test/java/io/karn/notify/NotifyAlertingTest.kt b/library/src/test/java/io/karn/notify/NotifyAlertingTest.kt index 1592911..6354e39 100644 --- a/library/src/test/java/io/karn/notify/NotifyAlertingTest.kt +++ b/library/src/test/java/io/karn/notify/NotifyAlertingTest.kt @@ -84,7 +84,7 @@ class NotifyAlertingTest : NotifyTestBase() { Assert.assertEquals(testAlerting.lockScreenVisibility, shadowChannel.lockscreenVisibility) Assert.assertEquals(testAlerting.channelName, shadowChannel.name) Assert.assertEquals(testAlerting.channelDescription, shadowChannel.description) - Assert.assertEquals(testAlerting.channelImportance + 2, shadowChannel.importance) + Assert.assertEquals(testAlerting.channelImportance + 3, shadowChannel.importance) // Assert.assertEquals(testLightColor, shadowChannel.lightColor) Assert.assertNull(shadowChannel.vibrationPattern) Assert.assertEquals(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION), shadowChannel.sound) @@ -163,7 +163,7 @@ class NotifyAlertingTest : NotifyTestBase() { Assert.assertEquals(testVisibility, shadowChannel.lockscreenVisibility) Assert.assertEquals(testChannelName, shadowChannel.name) Assert.assertEquals(testChannelDescription, shadowChannel.description) - Assert.assertEquals(testChannelImportance + 2, shadowChannel.importance) + Assert.assertEquals(testChannelImportance + 3, shadowChannel.importance) // Assert.assertEquals(testLightColor, shadowChannel.lightColor) Assert.assertEquals(testVibrationPattern, shadowChannel.vibrationPattern.toList()) Assert.assertEquals(testSound, shadowChannel.sound) diff --git a/library/src/test/java/io/karn/notify/NotifyTest.kt b/library/src/test/java/io/karn/notify/NotifyTest.kt index 8d310a8..83c95b8 100644 --- a/library/src/test/java/io/karn/notify/NotifyTest.kt +++ b/library/src/test/java/io/karn/notify/NotifyTest.kt @@ -82,7 +82,7 @@ class NotifyTest : NotifyTestBase() { Assert.assertEquals(testVisibility, shadowChannel.lockscreenVisibility) Assert.assertEquals(testChannelName, shadowChannel.name) Assert.assertEquals(testChannelDescription, shadowChannel.description) - Assert.assertEquals(testChannelImportance + 2, shadowChannel.importance) + Assert.assertEquals(testChannelImportance + 3, shadowChannel.importance) // Assert.assertEquals(testLightColor, shadowChannel.lightColor) Assert.assertEquals(testVibrationPattern, shadowChannel.vibrationPattern.toList()) Assert.assertEquals(testSound, shadowChannel.sound) From 4383b884d85e85cb7d25a96959cd8f9dc14f4d56 Mon Sep 17 00:00:00 2001 From: Karn Saheb Date: Tue, 2 Apr 2019 15:16:01 -0400 Subject: [PATCH 7/7] Version bump: 1.2.1 --- build.gradle | 1 - gradle/configuration.gradle | 4 ++++ library/build.gradle | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 985fcc1..123096b 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,5 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. group = 'io.karn' -version = '1.2.0' subprojects { apply from: rootProject.file('gradle/configuration.gradle') diff --git a/gradle/configuration.gradle b/gradle/configuration.gradle index e3344f1..b2c0f1e 100644 --- a/gradle/configuration.gradle +++ b/gradle/configuration.gradle @@ -7,6 +7,9 @@ def versions = [ + libCode: 11, + libName: '1.2.1', + kotlin: '1.3.11', core: '1.0.1', appcompat: '1.0.2', @@ -49,6 +52,7 @@ def testDependencies = [ ] ext.config = [ + "versions": versions, "deps" : dependencies, "testDeps": testDependencies, "build" : build diff --git a/library/build.gradle b/library/build.gradle index db5cbca..c52c5fb 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -37,8 +37,8 @@ android { targetSdkVersion config.build.targetSdk minSdkVersion config.build.minSdk - versionCode 10 - versionName "1.2.0" + versionCode config.versions.libCode + versionName config.versions.libName testInstrumentationRunner config.testDeps.instrumentationRunner }