diff --git a/GoogleBillingApiLib/build.gradle b/GoogleBillingApiLib/build.gradle index d8ec561..f4c4b35 100644 --- a/GoogleBillingApiLib/build.gradle +++ b/GoogleBillingApiLib/build.gradle @@ -2,6 +2,7 @@ plugins { id 'com.android.library' id 'kotlin-android' id 'kotlin-kapt' + id 'maven-publish' } android { @@ -23,6 +24,15 @@ android { proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_1_8.toString() + } } dependencies { @@ -39,5 +49,17 @@ dependencies { testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' +} +afterEvaluate { + publishing { + publications { + release(MavenPublication) { + from components.release + groupId = 'com.github.ss26dev' + artifactId = 'GoogleBillingApi' + version = '1.1.0' + } + } + } } \ No newline at end of file diff --git a/build.gradle b/build.gradle index 081cad1..264b2d8 100644 --- a/build.gradle +++ b/build.gradle @@ -11,14 +11,16 @@ buildscript { repositories { google() mavenCentral() + maven { url 'https://jitpack.io' } } dependencies { // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files - classpath 'com.android.tools.build:gradle:7.0.3' + classpath 'com.android.tools.build:gradle:7.0.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$version_kotlin" + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' } } @@ -26,6 +28,7 @@ allprojects { repositories { google() mavenCentral() + maven { url 'https://jitpack.io' } } } diff --git a/jitpack.yml b/jitpack.yml new file mode 100644 index 0000000..33b17ef --- /dev/null +++ b/jitpack.yml @@ -0,0 +1,2 @@ +jdk: + - openjdk11 \ No newline at end of file diff --git a/sample/build.gradle b/sample/build.gradle index a17794c..334f3a3 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -23,6 +23,15 @@ android { proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_1_8.toString() + } } dependencies { diff --git a/settings.gradle b/settings.gradle index db6a337..92bea28 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,3 +1,2 @@ include ':GoogleBillingApiLib' -include ':sample' rootProject.name = "GoogleBillingApi" \ No newline at end of file