Skip to content

Commit

Permalink
Make JitPack use Java 11 and Gradle 7
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmigloz committed Nov 5, 2021
1 parent b458c86 commit 7571915
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 6 deletions.
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ buildscript {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
apply from: 'dependencies.gradle'
Expand All @@ -16,6 +17,7 @@ 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
33 changes: 30 additions & 3 deletions lib/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android'
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'maven-publish'
}

ext.versionMajor = 2 // API Changes, adding big new feature, redesign the App
ext.versionMinor = 0 // New features in a backwards-compatible manner
Expand All @@ -27,6 +29,12 @@ android {
consumerProguardFiles 'proguard-rules.pro'
}

buildTypes {
release {
minifyEnabled false
}
}

resourcePrefix 'dragtoclose_'
}

Expand All @@ -36,3 +44,22 @@ dependencies {
implementation appDependencies.androidxCustomView
implementation appDependencies.kotlinStdlib
}

afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release
groupId = "com.davidmiguel.dragtoclose"
artifactId = "drag-to-close"
version = generateVersionName(versionMajor, versionMinor, versionPatch, versionClassifier)
artifact androidSourcesJar
}
}
}
}

task androidSourcesJar(type: Jar) {
classifier 'sources'
from android.sourceSets.main.java.srcDirs
}
7 changes: 4 additions & 3 deletions sample/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android'
plugins {
id 'com.android.application'
id 'kotlin-android'
}

ext.versionMajor = 1 // API Changes, adding big new feature, redesign the App
ext.versionMinor = 0 // New features in a backwards-compatible manner
Expand Down

0 comments on commit 7571915

Please sign in to comment.