diff --git a/README.md b/README.md index 878e3cf..c21f701 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,7 @@ [![Codacy Badge](https://app.codacy.com/project/badge/Grade/bb126216417b45668b81e08090d2d081)](https://www.codacy.com/gh/ItzNotABug/CheckoutVerifier/dashboard?utm_source=github.com&utm_medium=referral&utm_content=ItzNotABug/CheckoutVerifier&utm_campaign=Badge_Grade) CheckoutVerifier helps you Verify your In-App Purchase receipts & protect your Apps from hacking, patching used by Piracy Apps like Lucky Patcher. -
Since I was using these classes in every project,\ -the copy / pasting of classes was annoying so thought of releasing it as a library which might be of help to others too! +
Since I was using these classes in every project, the copy / pasting of classes was annoying so thought of releasing it as a library which might be of help to others too! ## How does it work? @@ -27,43 +26,32 @@ Just a create a File & name it as `verify.php` or anything you want. ```php ``` #### * Implementing Library (Gradle) -library_version: [![Download](https://api.bintray.com/packages/itznotabug/Maven/CheckoutVerifier/images/download.svg)](https://bintray.com/itznotabug/Maven/CheckoutVerifier/_latestVersion) -
+Note: Add `mavenCentral()` in `repositories` block. + ```gradle dependencies { // CheckoutVerifier now internally uses Kotlin Coroutines. diff --git a/bintray.gradle b/bintray.gradle deleted file mode 100644 index f40af66..0000000 --- a/bintray.gradle +++ /dev/null @@ -1,46 +0,0 @@ -apply plugin: 'com.jfrog.bintray' - -version = '1.8' - -task sourcesJar(type: Jar) { - from android.sourceSets.main.java.srcDirs - archiveClassifier.set("sources") -} - -task javadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - setClasspath(project.files(android.getBootClasspath().join(File.pathSeparator))) -} - -task javadocJar(type: Jar, dependsOn: javadoc) { - archiveClassifier.set("javadoc") - from javadoc.destinationDir -} -tasks.withType(Javadoc).all { - enabled = false -} - -artifacts { - archives javadocJar - archives sourcesJar -} - -Properties properties = new Properties() -properties.load(project.rootProject.file('local.properties').newDataInputStream()) - -bintray { - user = properties.getProperty("bintray.user") - key = properties.getProperty("bintray.apikey") - - setConfigurations('archives') - pkg { - repo = 'Maven' - name = 'CheckoutVerifier' - desc = 'Verify your In-App Purchase receipts & protect your Apps from hacking, patching used by Piracy Apps like Lucky Patcher.' - websiteUrl = 'https://github.com/ItzNotABug/CheckoutVerifier' - vcsUrl = 'https://github.com/ItzNotABug/CheckoutVerifier.git' - licenses = ["Apache-2.0"] - publish = true - publicDownloadNumbers = false - } -} \ No newline at end of file diff --git a/build.gradle b/build.gradle index 8ce2bb3..dbdf1f2 100644 --- a/build.gradle +++ b/build.gradle @@ -1,23 +1,29 @@ buildscript { - ext.kotlin_version = '1.4.21' + ext.kotlin_version = '1.5.21' repositories { google() - jcenter() + mavenCentral() + } + + ext { + RELEASE_REPOSITORY_URL = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" + SNAPSHOT_REPOSITORY_URL = "https://s01.oss.sonatype.org/content/repositories/snapshots/" } dependencies { - classpath 'com.android.tools.build:gradle:4.1.1' + classpath 'com.android.tools.build:gradle:4.2.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4' - classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0' + + classpath 'com.vanniktech:gradle-maven-publish-plugin:0.13.0' + classpath 'org.jetbrains.dokka:dokka-gradle-plugin:1.4.32' } } allprojects { repositories { google() - jcenter() + mavenCentral() } } diff --git a/gradle.properties b/gradle.properties index 58f55b9..c84841b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ org.gradle.jvmargs=-Xmx1536m android.useAndroidX=true android.enableJetifier=true -kotlin.code.style=official +kotlin.code.style=official \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 44b36de..a0e40a2 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Sep 28 15:30:00 IST 2020 +#Mon Jul 26 13:39:22 IST 2021 distributionBase=GRADLE_USER_HOME +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip +zipStoreBase=GRADLE_USER_HOME diff --git a/install.gradle b/install.gradle deleted file mode 100644 index 835e4a2..0000000 --- a/install.gradle +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Created by Darshan Pandya. - * @itznotabug - * Copyright (c) 2019. - */ - -apply plugin: 'com.github.dcendents.android-maven' - -group = 'com.lazygeniouz' - -install { - repositories.mavenInstaller { - pom { - project { - packaging 'aar' - groupId 'com.lazygeniouz' // CREATE A GROUP ID FOR YOUR LIBRARY - artifactId 'checkout-verifier' // THE NAME OF YOUR MODULE - - name 'CheckoutVerifier' // YOUR LIBRARY NAME - description 'A simple Android library to cross promote your apps, websites!' // YOUR LIBRARY DESCRIPTION - url 'https://github.com/ItzNotABug/CheckoutVerifier' // YOUR SITE - - licenses { - license { - name 'The Apache Software License, Version 2.0' - url 'http://www.apache.org/licenses/LICENSE-2.0.txt' - } - } - developers { - developer { - id 'itznotabug' //YOUR ID - name 'DarShan Pandya' //YOUR NAME - email 'itznotabug@gmail.com' //YOUR EMAIL - } - } - scm { - connection 'https://github.com/ItzNotABug/CheckoutVerifier.git' // YOUR GIT REPO - developerConnection 'https://github.com/ItzNotABug/CheckoutVerifier.git' // YOUR GIT REPO - url 'https://github.com/ItzNotABug/CheckoutVerifier' // YOUR SITE - } - } - } - } -} \ No newline at end of file diff --git a/library/.gitignore b/library/.gitignore index 796b96d..0baf7ac 100644 --- a/library/.gitignore +++ b/library/.gitignore @@ -1 +1,2 @@ /build +/gradle.properties \ No newline at end of file diff --git a/library/build.gradle b/library/build.gradle index 89dbdcb..659ce88 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -1,4 +1,5 @@ apply plugin: 'com.android.library' +apply plugin: 'com.vanniktech.maven.publish' apply plugin: 'kotlin-android' android { @@ -6,22 +7,29 @@ android { defaultConfig { minSdkVersion 14 targetSdkVersion 30 - versionCode 108 - versionName "1.8" + versionCode 200 + versionName "2.0.0" } + buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' + } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2' -} - -apply from: '../install.gradle' -apply from: '../bintray.gradle' + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" + implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1' +} \ No newline at end of file diff --git a/library/src/main/java/com/lazygeniouz/checkoutverifier/CheckoutVerifier.kt b/library/src/main/java/com/lazygeniouz/checkoutverifier/CheckoutVerifier.kt index 45e6158..73d0cee 100644 --- a/library/src/main/java/com/lazygeniouz/checkoutverifier/CheckoutVerifier.kt +++ b/library/src/main/java/com/lazygeniouz/checkoutverifier/CheckoutVerifier.kt @@ -4,6 +4,8 @@ package com.lazygeniouz.checkoutverifier import com.lazygeniouz.checkoutverifier.bundle.PurchaseBundle import com.lazygeniouz.checkoutverifier.helper.CheckoutHelper +import com.lazygeniouz.checkoutverifier.results.CompletionResult +import com.lazygeniouz.checkoutverifier.results.ErrorResult import com.lazygeniouz.checkoutverifier.results.Result import org.jetbrains.annotations.NotNull @@ -17,9 +19,9 @@ import org.jetbrains.annotations.NotNull class CheckoutVerifier(@NotNull private val purchaseBundle: PurchaseBundle) { /** - * An **ErrorResult** if an exception was caught, + * An [ErrorResult] if an exception was caught, * - * A **CompletionResult** otherwise. + * A [CompletionResult] otherwise. * * @return [Result] */ @@ -34,5 +36,4 @@ class CheckoutVerifier(@NotNull private val purchaseBundle: PurchaseBundle) { && purchaseBundle.verifyingUrl.startsWith("http") && purchaseBundle.jsonResponse.trim().isNotEmpty() && purchaseBundle.signature.trim().isNotEmpty() - }