Skip to content

Commit

Permalink
update buildscripts and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
kahles committed Feb 8, 2024
1 parent 705c968 commit f4ddd73
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 54 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Set up JDK 1.8
uses: actions/setup-java@v1
uses: actions/setup-java@v2
with:
java-version: 1.8
- name: Attach git branch
Expand Down
126 changes: 78 additions & 48 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,67 +1,69 @@
buildscript {
repositories {
jcenter()
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
classpath 'com.android.tools.build:gradle:8.2.2'
}
}

plugins {
id 'com.gladed.androidgitversion' version '0.4.9'
id 'io.codearte.nexus-staging' version '0.21.0'
id 'maven-publish'
id 'signing'
id 'com.gladed.androidgitversion' version '0.4.14'
//id 'io.github.gradle-nexus.publish-plugin' version '1.3.0'
}

apply plugin: 'com.android.library'
apply plugin: 'com.bmuschko.nexus'

androidGitVersion {
format '%tag%%-count%%-commit%%-branch%%_dirty%'
hideBranches = ['master','devel']
}

group = "de.kah2.zodiac"
version = androidGitVersion.name() + "-SNAPSHOT"

println "Version is: " + version
afterEvaluate {
println(" Version name:\t " + androidGitVersion.name() )
println(" Version code:\t " + androidGitVersion.code() )
}

repositories {
jcenter()
google()
mavenLocal()
mavenCentral()
/* For snapshots:
// For snapshots:
/*
maven {
url = 'https://oss.sonatype.org/content/repositories/snapshots/'
} */
}
*/
}

dependencies {

implementation 'org.slf4j:slf4j-api:1.7.26'
testImplementation 'org.slf4j:slf4j-simple:1.7.26'
implementation 'org.slf4j:slf4j-api:1.7.36'
testImplementation 'org.slf4j:slf4j-simple:1.7.36'

// Removed, because actual version doesn't work for multi-threaded use
// compile 'net.sourceforge.novaforjava:novaforjava:0.15.0.0'

// my fixed fork: https://github.com/kahles/nova4jmt

// local use
// compile files('../nova4java/target/nova4jmt-0.15.0.1-SNAPSHOT.jar')
// => my fixed fork: https://github.com/kahles/nova4jmt

// maven central snapshot (uncomment also above in repositories)
//compile 'de.kah2.zodiac:nova4jmt:0.15.0.1-SNAPSHOT'
//api 'de.kah2.zodiac:nova4jmt:0.15.0.1-SNAPSHOT'

// maven central releases
implementation 'de.kah2.zodiac:nova4jmt:0.15.0.1'
api 'de.kah2.zodiac:nova4jmt:0.15.0.1'

//implementation 'com.android.support:appcompat-v7:27.1.1'

// Android backports
implementation 'com.jakewharton.threetenabp:threetenabp:1.2.1'
implementation 'com.jakewharton.threetenabp:threetenabp:1.4.6'
implementation 'net.sourceforge.streamsupport:android-retrofuture:1.7.1'

// Testing
testImplementation 'junit:junit:4.12'
testImplementation('org.threeten:threetenbp:1.4.0') {
testImplementation 'junit:junit:4.13.2'
testImplementation('org.threeten:threetenbp:1.6.8') {
exclude group: 'com.jakewharton.threetenabp', module: 'threetenabp'
}

Expand All @@ -73,11 +75,15 @@ dependencies {
}

android {
compileSdkVersion 28

namespace 'de.kah2.zodiac'

compileSdk 34

defaultConfig {
minSdkVersion 15
targetSdkVersion 28

minSdkVersion 21
targetSdkVersion 34

versionCode androidGitVersion.code()
versionName androidGitVersion.name()
Expand All @@ -100,34 +106,58 @@ android {
testOptions {
unitTests.returnDefaultValues = true
}

publishing {
singleVariant('release') {
withSourcesJar()
}
}
}

modifyPom {
project {
name = 'libZodiac4A'
description = 'android framework providing functionality for building a lunar calendar'
url = 'https://github.com/kahles/libZodiac4A'
publishing {
publications {
release(MavenPublication) {

scm {
url = 'https://github.com/kahles/libZodiac4A/tree/master'
connection = 'scm:git:git://github.com/kahles/libZodiac4A.git'
developerConnection = 'scm:git:ssh://github.com/kahles/libZodiac4A.git'
}
groupId = 'de.kah2.zodiac'
artifactId = 'libZodiac4A'
version = androidGitVersion.name()

licenses {
license {
name = 'GNU LESSER GENERAL PUBLIC LICENSE (LGPL) version 3'
url = 'http://www.gnu.org/licenses/lgpl-3.0-standalone.html'
afterEvaluate {
from components.release
}
}

developers {
developer {
id = 'kahles'
name = 'Stephan Kahle'
email = '[email protected]'
timezone = '+1'
pom {
name = 'libZodiac4A'
description = 'android framework providing functionality for building a lunar calendar'
url = 'https://github.com/kahles/libZodiac4A'

licenses {
license {
name = 'GNU LESSER GENERAL PUBLIC LICENSE (LGPL) version 3'
url = 'http://www.gnu.org/licenses/lgpl-3.0-standalone.html'
}
}

developers {
developer {
id = 'kahles'
name = 'Stephan Kahle'
email = '[email protected]'
}
}

scm {
url = 'https://github.com/kahles/libZodiac4A/tree/master'
connection = 'scm:git:git://github.com/kahles/libZodiac4A.git'
developerConnection = 'scm:git:ssh://github.com/kahles/libZodiac4A.git'
}
}
}
}
repositories {
}
}

signing {
sign publishing.publications.release
}
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Tue Mar 14 08:35:10 CET 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
3 changes: 1 addition & 2 deletions src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
<manifest
package="de.kah2.zodiac.libZodiac4A"/>
<manifest />

0 comments on commit f4ddd73

Please sign in to comment.