-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump Gradle to 8.10.2, require Java 11
- Loading branch information
Showing
64 changed files
with
1,195 additions
and
531 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,26 @@ | ||
GRADLE ?= ./gradlew | ||
|
||
.PHONY: all | ||
all: check codecov eclipse javadocAll inttest | ||
|
||
.PHONY: codecov | ||
codecov: | ||
$(GRADLE) minidns-hla:testCodeCoverageReport | ||
echo "Code coverage report available at $(PWD)/minidns-hla/build/reports/jacoco/testCodeCoverageReport/html/index.html" | ||
|
||
.PHONY: check | ||
check: | ||
$(GRADLE) $@ | ||
|
||
.PHONY: eclipse | ||
eclipse: | ||
$(GRADLE) $@ | ||
|
||
.PHONY: inttest | ||
inttest: | ||
$(GRADLE) $@ | ||
|
||
.PHONY: javadocAll | ||
javadocAll: | ||
$(GRADLE) $@ | ||
echo "javadoc available at $(PWD)/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,14 @@ | ||
plugins { | ||
id 'groovy-gradle-plugin' | ||
} | ||
|
||
repositories { | ||
gradlePluginPortal() | ||
} | ||
|
||
dependencies { | ||
implementation "biz.aQute.bnd:biz.aQute.bnd.gradle:7.0.0" | ||
implementation "me.champeau.jmh:jmh-gradle-plugin:0.7.2" | ||
implementation "net.ltgt.gradle:gradle-errorprone-plugin:4.0.1" | ||
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 = 'minidns-build-logic' |
6 changes: 6 additions & 0 deletions
6
build-logic/src/main/groovy/org.minidns.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.minidns.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.minidns.common-conventions' | ||
} | ||
dependencies { | ||
signature "net.sf.androidscents.signature:android-api-level-${minAndroidSdk}:4.4.2_r4@signature" | ||
} | ||
animalsniffer { | ||
sourceSets = [sourceSets.main] | ||
} |
12 changes: 12 additions & 0 deletions
12
build-logic/src/main/groovy/org.minidns.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() | ||
} |
36 changes: 36 additions & 0 deletions
36
build-logic/src/main/groovy/org.minidns.common-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,36 @@ | ||
ext { | ||
javaVersion = JavaVersion.VERSION_11 | ||
javaMajor = javaVersion.getMajorVersion() | ||
minAndroidSdk = 19 | ||
|
||
androidBootClasspath = getAndroidRuntimeJar(minAndroidSdk) | ||
|
||
// Export the function by turning it into a closure. | ||
// https://stackoverflow.com/a/23290820/194894 | ||
getAndroidRuntimeJar = this.&getAndroidRuntimeJar | ||
} | ||
|
||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
} | ||
|
||
def getAndroidRuntimeJar(androidApiLevel) { | ||
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 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.