Skip to content

Commit

Permalink
[gradle] Fix Jitpack known issue jitpack/jitpack.io#4772
Browse files Browse the repository at this point in the history
  • Loading branch information
adriansulumberchean committed Nov 28, 2021
1 parent ffb8bf9 commit 5daea95
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 2 deletions.
22 changes: 22 additions & 0 deletions GoogleBillingApiLib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ plugins {
id 'com.android.library'
id 'kotlin-android'
id 'kotlin-kapt'
id 'maven-publish'
}

android {
Expand All @@ -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 {
Expand All @@ -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'
}
}
}
}
5 changes: 4 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,24 @@ 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'
}
}

allprojects {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
}

Expand Down
2 changes: 2 additions & 0 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
jdk:
- openjdk11
9 changes: 9 additions & 0 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 0 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
include ':GoogleBillingApiLib'
include ':sample'
rootProject.name = "GoogleBillingApi"

0 comments on commit 5daea95

Please sign in to comment.