allprojects { apply plugin: 'java-library' apply plugin: 'maven-publish' compileJava.options.encoding = 'UTF-8' compileTestJava.options.encoding = 'UTF-8' sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 version 'v0.24.8' group 'com.github.TeamNewPipe' repositories { mavenCentral() maven { url "https://jitpack.io" } } afterEvaluate { publishing { publications { mavenJava(MavenPublication) { from components.java } } } } ext { nanojsonVersion = "e9d656ddb49a412a5a0a5d5ef20ca7ef09549996" jsr305Version = "3.0.2" junitVersion = "5.13.4" checkstyleVersion = "10.4" } } dependencies { api project(':extractor') implementation project(':timeago-parser') } subprojects { tasks.register('sourcesJar', Jar) { dependsOn classes archiveClassifier.set('sources') from sourceSets.main.allSource } // Protobuf files would uselessly end up in the JAR otherwise, see // https://github.com/google/protobuf-gradle-plugin/issues/390 tasks.withType(Jar).configureEach { exclude '**/*.proto' includeEmptyDirs false } tasks.withType(Test).configureEach { testLogging { events "skipped", "failed" showStandardStreams = true exceptionFormat = 'full' } } artifacts { archives sourcesJar } } // https://discuss.gradle.org/t/best-approach-gradle-multi-module-project-generate-just-one-global-javadoc/18657/21 tasks.register('aggregatedJavadocs', Javadoc) { destinationDir = layout.buildDirectory.file("docs/javadoc").get().asFile title = "$project.name $version" // options.memberLevel = JavadocMemberLevel.PRIVATE options.links 'https://docs.oracle.com/javase/11/docs/api/' options.encoding 'UTF-8' // Fixes unknown tag @implNote; the other two were added precautionary options.tags = [ "apiNote:a:API Note:", "implSpec:a:Implementation Requirements:", "implNote:a:Implementation Note:" ] subprojects.each { project -> project.tasks.withType(Javadoc).each { javadocTask -> source += javadocTask.source classpath += javadocTask.classpath excludes += javadocTask.excludes includes += javadocTask.includes } } }