Skip to content

Commit

Permalink
Fixing JitPack build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
d4rken committed Aug 5, 2021
1 parent 532a88a commit 755466a
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 150 deletions.
10 changes: 2 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
buildscript {
repositories {
google()
maven {
url "https://plugins.gradle.org/m2/"
}
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath 'com.dicedmelon.gradle:jacoco-android:0.1.5'
}
}

allprojects {
repositories {
google()
maven {
url "https://plugins.gradle.org/m2/"
}
maven { url "https://plugins.gradle.org/m2/" }
}
ext {
globalMinSdkVersion = 14
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
91 changes: 0 additions & 91 deletions publish-to-bintray.gradle

This file was deleted.

85 changes: 34 additions & 51 deletions tracker/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
apply plugin: 'com.android.library'
apply plugin: 'maven-publish'

def versionMajor = 4
def versionMinor = 1
def versionPatch = 2
def versionPatch = 4
def myVersionCode = versionMajor * 10000 + versionMinor * 100 + versionPatch
def myVersionName = "${versionMajor}.${versionMinor}.${versionPatch}"

Expand All @@ -14,6 +15,13 @@ android {
targetSdkVersion project.ext.globalTargetSdkVersion
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

testOptions.unitTests.includeAndroidResources = true
}

Expand All @@ -37,23 +45,6 @@ dependencies {
testImplementation 'org.robolectric:robolectric:4.3.1'
}

/**
* JAR
*/
task clearJar(type: Delete) {
delete fileTree(dir: "jar", exclude: "dont_delete.txt")
}

task makeJar(type: Copy) {
from('build/intermediates/bundles/release/')
into('jar/')
include('classes.jar')
def fileName = 'MatomoAndroidSdk-' + 'git rev-parse --short HEAD'.execute().text.trim() + '.jar'
rename('classes.jar', fileName)
}

makeJar.dependsOn(clearJar, build)

/**
* Coverage
*/
Expand Down Expand Up @@ -91,37 +82,29 @@ android.libraryVariants.all { variant ->
}
}

def credentialsFile = new File(System.properties['user.home'], ".bintray/bintray.properties")
ext {
if (credentialsFile.canRead()) {
Properties props = new Properties()
props.load(new FileInputStream(credentialsFile))
bintrayUser = props['bintray.user']
bintrayApiKey = props['bintray.apikey']
afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release

groupId = 'org.matomo.sdk'
artifactId = 'tracker'
version = myVersionName

pom {
name = 'Matomo SDK for Android'
description = 'SDK for Android to measure your apps with Matomo'
url = 'https://github.com/matomo-org/matomo-sdk-android'

licenses {
license {
name = 'BSD-3 Clause'
url = 'https://github.com/matomo-org/matomo-sdk-android/blob/master/LICENSE'
}
}
}
}
}
}

bintrayRepo = 'maven'
bintrayName = 'matomo-sdk-android'

publishedGroupId = 'org.matomo.sdk'
libraryName = 'Matomo SDK for Android'
artifact = 'tracker'

libraryDescription = 'SDK for Android to measure your apps with Matomo'

siteUrl = 'https://github.com/matomo-org/matomo-sdk-android'
gitUrl = 'https://github.com/matomo-org/matomo-sdk-android.git'

libraryVersion = myVersionName

developerId = 'darken'
developerName = 'Matthias Urhahn'
developerEmail = '[email protected]'

licenseName = 'BSD-3 Clause'
licenseUrl = 'https://github.com/matomo-org/matomo-sdk-android/blob/master/LICENSE'
allLicenses = ["BSD 3-Clause"]
}
if (credentialsFile.canRead()) {
apply from: '../publish-to-bintray.gradle'
}
}

0 comments on commit 755466a

Please sign in to comment.