-
Notifications
You must be signed in to change notification settings - Fork 885
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #632 from Flowdalic/smack-gradle-bump
Bump to Gradle 8.10.2, require Java 11
- Loading branch information
Showing
136 changed files
with
1,155 additions
and
1,214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
GRADLE ?= ./gradlew | ||
|
||
.PHONY: all | ||
all: check jacocoRootReport javadocAll sinttest | ||
|
||
.PHONY: codecov | ||
codecov: | ||
$(GRADLE) smack-java8-full:testCodeCoverageReport | ||
echo "Report available at smack-java8-full/build/reports/jacoco/testCodeCoverageReport/html/index.html" | ||
|
||
.PHONY: check | ||
check: | ||
$(GRADLE) $@ | ||
|
||
.PHONY: eclipse | ||
eclipse: | ||
$(GRADLE) $@ | ||
|
||
.PHONY: sinttest | ||
sinttest: | ||
$(GRADLE) $@ | ||
|
||
.PHONY: jacocoRootReport | ||
jacocoRootReport: | ||
$(GRADLE) $@ | ||
|
||
.PHONY: javadocAll | ||
javadocAll: | ||
$(GRADLE) $@ | ||
echo "Smack javadoc available at build/javadoc/index.html" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
plugins { | ||
id 'groovy-gradle-plugin' | ||
} | ||
|
||
repositories { | ||
gradlePluginPortal() | ||
} | ||
|
||
dependencies { | ||
implementation "biz.aQute.bnd:biz.aQute.bnd.gradle:7.0.0" | ||
implementation "io.freefair.gradle:maven-plugin:8.10" // for io.freefair.agregate-javadoc | ||
implementation "me.champeau.jmh:jmh-gradle-plugin:0.7.2" | ||
implementation "net.ltgt.gradle:gradle-errorprone-plugin:4.0.1" | ||
implementation "gradle.plugin.org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.12.2" | ||
implementation "ru.vyarus:gradle-animalsniffer-plugin:1.7.1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
rootProject.name = 'smack-build-logic' |
6 changes: 6 additions & 0 deletions
6
...-logic/src/main/groovy/org.igniterealtime.smack.android-boot-classpath-conventions.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
compileJava { | ||
options.bootstrapClasspath = files(androidBootClasspath) | ||
} | ||
javadoc { | ||
classpath += files(androidBootClasspath) | ||
} |
10 changes: 10 additions & 0 deletions
10
build-logic/src/main/groovy/org.igniterealtime.smack.android-conventions.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
plugins { | ||
id 'ru.vyarus.animalsniffer' | ||
id 'org.igniterealtime.smack.global-conventions' | ||
} | ||
dependencies { | ||
signature "net.sf.androidscents.signature:android-api-level-${smackMinAndroidSdk}:5.0.1_r2@signature" | ||
} | ||
animalsniffer { | ||
sourceSets = [sourceSets.main] | ||
} |
12 changes: 12 additions & 0 deletions
12
build-logic/src/main/groovy/org.igniterealtime.smack.application-conventions.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
plugins { | ||
id 'application' | ||
} | ||
|
||
application { | ||
applicationDefaultJvmArgs = ["-enableassertions"] | ||
} | ||
|
||
run { | ||
// Pass all system properties down to the "application" run | ||
systemProperties System.getProperties() | ||
} |
37 changes: 37 additions & 0 deletions
37
build-logic/src/main/groovy/org.igniterealtime.smack.global-conventions.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
ext { | ||
javaVersion = JavaVersion.VERSION_11 | ||
javaMajor = javaVersion.getMajorVersion() | ||
smackMinAndroidSdk = 21 | ||
|
||
androidBootClasspath = { getAndroidRuntimeJar() } | ||
} | ||
|
||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
} | ||
|
||
def getAndroidRuntimeJar() { | ||
def androidApiLevel = ext.smackMinAndroidSdk | ||
def androidHome = getAndroidHome() | ||
def androidJar = new File("$androidHome/platforms/android-${androidApiLevel}/android.jar") | ||
if (androidJar.isFile()) { | ||
return androidJar | ||
} else { | ||
throw new Exception("Can't find android.jar for API level ${androidApiLevel}. Please install corresponding SDK platform package") | ||
} | ||
} | ||
def getAndroidJavadocOffline() { | ||
def androidHome = getAndroidHome() | ||
return androidHome.toString() + "/docs/reference" | ||
} | ||
|
||
def getAndroidHome() { | ||
def androidHomeEnv = System.getenv("ANDROID_HOME") | ||
if (androidHomeEnv == null) { | ||
throw new Exception("ANDROID_HOME environment variable is not set") | ||
} | ||
def androidHome = new File(androidHomeEnv) | ||
if (!androidHome.isDirectory()) throw new Exception("Environment variable ANDROID_HOME is not pointing to a directory") | ||
return androidHome | ||
} |
Oops, something went wrong.