[Git][java-team/checker-framework-java][master] Initial packaging

Olek Wojnar gitlab at salsa.debian.org
Sun Jul 19 01:24:16 BST 2020



Olek Wojnar pushed to branch master at Debian Java Maintainers / checker-framework-java


Commits:
e38f99a6 by Olek Wojnar at 2020-07-15T16:06:15-04:00
Initial packaging

- - - - -


15 changed files:

- + debian/changelog
- + debian/control
- + debian/copyright
- + debian/libchecker-framework-java.doc-base
- + debian/libchecker-framework-java.docs
- + debian/libchecker-framework-java.poms
- + debian/maven.ignoreRules
- + debian/maven.properties
- + debian/patches/fix-gradle-build.patch
- + debian/patches/remove-doc-image-links.patch
- + debian/patches/series
- + debian/rules
- + debian/source/format
- + debian/upstream/metadata
- + debian/watch


Changes:

=====================================
debian/changelog
=====================================
@@ -0,0 +1,9 @@
+checker-framework-java (3.0.1+ds-1) unstable; urgency=medium
+
+  * Initial release (Closes: #959832)
+  * Provide additional information about authors
+  * Restore Gradle build system
+  * Backport license clarifications from upstream in d/copyright
+    - https://github.com/typetools/checker-framework/issues/3429
+
+ -- Olek Wojnar <olek at debian.org>  Wed, 15 Jul 2020 16:06:07 -0400


=====================================
debian/control
=====================================
@@ -0,0 +1,29 @@
+Source: checker-framework-java
+Section: java
+Priority: optional
+Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
+Uploaders: Olek Wojnar <olek at debian.org>,
+           Andreas Tille <tille at debian.org>,
+Build-Depends: android-sdk-helper,
+               bnd,
+               debhelper-compat (= 13),
+               default-jdk,
+               gradle-apt-plugin,
+               gradle-debian-helper,
+               libgradle-android-plugin-java,
+               libgradle-core-java,
+               libgradle-plugins-java,
+               maven-repo-helper,
+Standards-Version: 4.5.0
+Rules-Requires-Root: no
+Homepage: https://github.com/typetools/checker-framework
+Vcs-Browser: https://salsa.debian.org/java-team/checker-framework-java
+Vcs-Git: https://salsa.debian.org/java-team/checker-framework-java.git
+
+Package: libchecker-framework-java
+Architecture: all
+Depends: ${misc:Depends}
+Description: Framework that makes Java’s type system more powerful and useful
+ A "checker" is a tool that warns you about certain errors or gives you a
+ guarantee that those errors do not occur. The Checker Framework comes with
+ checkers for 24 specific types of errors.


=====================================
debian/copyright
=====================================
@@ -0,0 +1,107 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: checker-framework
+Source: https://github.com/typetools/checker-framework
+Files-Excluded: gradlew*
+                gradle
+                docs/tutorial/*
+                checker/jdk/*
+                docs/developer/release/*
+Comment: Exclude Gradle wrapper, embedded JAR files, embedded JDK, and
+ upstream release files.
+ .
+ Files using the MIT license have been updated based on upstream clarification
+ at https://github.com/typetools/checker-framework/issues/3429. This is
+ implemented upstream after version 3.5.0. Once such a version is packaged in
+ Debian, this clarification paragraph can be removed.
+ .
+ Full list of project contributors is located at docs/manual/contributors.tex.
+
+Files: *
+Copyright: 2004-2020 Checker Framework developers
+           2004-2020 Michael Ernst <mernst at cs.washington.edu>
+           2004-2020 Werner M. Dietl <wdietl at uwaterloo.ca>
+           2004-2020 Suzanne Millstein <smillst at cs.washington.edu>
+License: GPL-2.0-with-classpath-exception
+
+Files: **/*.astub
+       **/qual/*.java
+       **/FormatUtil.java
+       **/I18nFormatUtil.java
+       **/NullnessUtil.java
+       **/Opt.java
+       **/PurityUnqualified.java
+       **/RegexUtil.java
+       **/SignednessUtil.java
+       **/SignednessUtilExtra.java
+       **/UnitsTools.java
+       checker/src/testannotations/**/*.java
+       framework/src/main/java/org/jmlspecs/**/*.java
+Copyright: 2004-2020 Checker Framework developers
+           2004-2020 Michael Ernst <mernst at cs.washington.edu>
+           2004-2020 Werner M. Dietl <wdietl at uwaterloo.ca>
+           2004-2020 Suzanne Millstein <smillst at cs.washington.edu>
+License: MIT
+
+Files: debian/*
+Copyright: 2020 Olek Wojnar <olek at debian.org>
+License: MIT
+
+License: GPL-2.0-with-classpath-exception
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of version 2 of the GNU General Public License as
+ published by the Free Software Foundation.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ .
+ On Debian systems, the full text of the GNU General Public License version 2
+ can be found in the file `/usr/share/common-licenses/GPL-2'.
+ .
+ .
+ "CLASSPATH" EXCEPTION TO THE GPL
+ .
+ Certain source files distributed by Oracle America and/or its affiliates are
+ subject to the following clarification and special exception to the GPL, but
+ only where Oracle has expressly included in the particular source file's header
+ the words "Oracle designates this particular file as subject to the "Classpath"
+ exception as provided by Oracle in the LICENSE file that accompanied this code."
+ .
+    Linking this library statically or dynamically with other modules is making
+    a combined work based on this library.  Thus, the terms and conditions of
+    the GNU General Public License cover the whole combination.
+ .
+    As a special exception, the copyright holders of this library give you
+    permission to link this library with independent modules to produce an
+    executable, regardless of the license terms of these independent modules,
+    and to copy and distribute the resulting executable under terms of your
+    choice, provided that you also meet, for each linked independent module,
+    the terms and conditions of the license of that module.  An independent
+    module is a module which is not derived from or based on this library.  If
+    you modify this library, you may extend this exception to your version of
+    the library, but you are not obligated to do so.  If you do not wish to do
+    so, delete this exception statement from your version.
+
+License: MIT
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.


=====================================
debian/libchecker-framework-java.doc-base
=====================================
@@ -0,0 +1,7 @@
+Document: libchecker-framework-java
+Title: Checker Framework Library Documentation
+Section: Programming/Java
+
+Format: HTML
+Index: /usr/share/doc/libchecker-framework-java/checker-framework-webpage.html
+Files: /usr/share/doc/libchecker-framework-java/*


=====================================
debian/libchecker-framework-java.docs
=====================================
@@ -0,0 +1,2 @@
+docs/*
+README.md


=====================================
debian/libchecker-framework-java.poms
=====================================
@@ -0,0 +1,7 @@
+#checker/build/debian/checker.pom --java-lib --artifact=checker/build/libs/*.jar
+#javacutil/build/debian/javacutil.pom --java-lib --artifact=javacutil/build/libs/*.jar
+#dataflow/build/debian/dataflow.pom --java-lib --artifact=dataflow/build/libs/*.jar
+#framework/build/debian/framework.pom --java-lib --artifact=framework/build/libs/*.jar
+checker-qual/build/debian/checker-qual.pom --java-lib --artifact=checker-qual/build/libs/*.jar
+checker-qual-android/build/debian/checker-qual-android.pom --java-lib --artifact=checker-qual-android/build/libs/*.jar
+#framework-test/build/debian/framework-test.pom --java-lib --artifact=framework-test/build/libs/*.jar


=====================================
debian/maven.ignoreRules
=====================================
@@ -0,0 +1,11 @@
+ru.vyarus gradle-animalsniffer-plugin
+net.ltgt.gradle gradle-errorprone-plugin
+com.github.ben-manes gradle-versions-plugin
+gradle.plugin.com.github.sherter.google-java-format google-java-format-gradle-plugin
+me.champeau.gradle jmh-gradle-plugin
+gradle.plugin.io.morethan.jmhreport gradle-jmh-report
+com.google.android annotations
+
+#com.google.guava guava-testlib
+#com.google.truth truth
+#junit junit


=====================================
debian/maven.properties
=====================================
@@ -0,0 +1,7 @@
+project.build.sourceEncoding=UTF-8
+maven.test.skip=true
+maven.compiler.source=1.8
+maven.compiler.target=1.8
+maven.compiler.verbose=true
+org.slf4j.simpleLogger.defaultLogLevel=debug
+trimStackTrace=false


=====================================
debian/patches/fix-gradle-build.patch
=====================================
@@ -0,0 +1,716 @@
+Description: Allow Gradle to correctly build this package
+Author: Olek Wojnar <olek at debian.org>
+Last-Update: 2020-07-04
+
+--- a/build.gradle
++++ b/build.gradle
+@@ -1,20 +1,3 @@
+-import de.undercouch.gradle.tasks.download.Download
+-
+-plugins {
+-    // https://plugins.gradle.org/plugin/com.github.johnrengelman.shadow (v5 requires Gradle 5)
+-    id 'com.github.johnrengelman.shadow' version '5.2.0'
+-    // https://plugins.gradle.org/plugin/de.undercouch.download
+-    id "de.undercouch.download" version "4.0.2"
+-    id 'java'
+-    // https://github.com/tbroyer/gradle-errorprone-plugin
+-    id "net.ltgt.errorprone" version "1.1.1"
+-    // https://plugins.gradle.org/plugin/org.ajoberstar.grgit
+-    id 'org.ajoberstar.grgit' version '4.0.0' apply false
+-}
+-apply plugin: "de.undercouch.download"
+-
+-import org.ajoberstar.grgit.Grgit
+-
+ repositories {
+     jcenter()
+     mavenCentral()
+@@ -39,8 +22,6 @@
+     stubparserJar = "${stubparser}/javaparser-core/target/stubparser.jar"
+ 
+     jtregHome = "${parentDir}/jtreg"
+-    formatScriptsHome = "${project(':checker').projectDir}/bin-devel/.run-google-java-format"
+-    plumeScriptsHome = "${project(':checker').projectDir}/bin-devel/.plume-scripts"
+ 
+     javadocMemberLevel = JavadocMemberLevel.PROTECTED
+ 
+@@ -58,18 +39,8 @@
+     }
+ }
+ 
+-task installGitHooks(type: Copy, dependsOn: 'setLocalRepo') {
+-    description 'Copies git hooks to .git directory'
+-    from files("checker/bin-devel/git.post-merge", "checker/bin-devel/git.pre-commit")
+-    rename('git\\.(.*)', '$1')
+-    into localRepo + "/hooks"
+-}
+-
+ allprojects {
+     apply plugin: 'java'
+-    apply plugin: 'com.github.johnrengelman.shadow'
+-    apply plugin: "de.undercouch.download"
+-    apply plugin: 'net.ltgt.errorprone'
+ 
+     group 'org.checkerframework'
+     // Increment the minor version rather than just the patch level if:
+@@ -94,47 +65,8 @@
+         annotationProcessor.exclude group:'org.checkerframework', module:'checker-qual'
+     }
+ 
+-    dependencies {
+-        if (isJava8) {
+-            javacJar group: 'com.google.errorprone', name: 'javac', version: "$errorproneJavacVersion"
+-        }
+-
+-        errorproneJavac("com.google.errorprone:javac:$errorproneJavacVersion")
+-    }
+-
+     // After all the tasks have been created, modify some of them.
+     afterEvaluate {
+-        // Add the fat checker.jar to the classpath of every Javadoc task. This allows Javadoc in
+-        // any module to reference classes in any other module.
+-        // Also, build and use ManualTaglet as a taglet.
+-        tasks.withType(Javadoc) {
+-            def tagletVersion = isJava8 ? 'taglet' : 'tagletJdk11'
+-
+-            dependsOn(':checker:shadowJar')
+-            dependsOn(":framework-test:${tagletVersion}Classes")
+-            doFirst {
+-                options.encoding = 'UTF-8'
+-                if (!name.startsWith('requireJavadoc') && !name.equals("javadocDoclintAll")) {
+-                    options.memberLevel = javadocMemberLevel
+-                }
+-                classpath += files(project(':checker').tasks.getByName('shadowJar').archivePath)
+-                if (isJava8) {
+-                    classpath += configurations.javacJar
+-                }
+-                options.taglets 'org.checkerframework.taglet.ManualTaglet'
+-                options.tagletPath(project(':framework-test').sourceSets."${tagletVersion}".output.classesDirs.getFiles() as File[])
+-
+-                // We want to link to Java 9 documentation of the compiler classes since we use Java 9
+-                // versions of those classes and Java 8 for everything else.  Because the compiler classes are not
+-                // apart of the main documentation of Java 8, javadoc links to the Java 9 versions.
+-                options.links = ['https://docs.oracle.com/javase/8/docs/api/', 'https://docs.oracle.com/javase/9/docs/api/']
+-                // This file is looked for by Javadoc.
+-                file("${destinationDir}/resources/fonts/").mkdirs()
+-                ant.touch(file: "${destinationDir}/resources/fonts/dejavu.css")
+-                options.addStringOption('source', '8')
+-            }
+-        }
+-
+         /// TODO: One day we can enable this.  For now, CI jobs require Javadoc on changed lines.
+         // // Turn Javadoc warnings into errors.
+         // tasks.withType(Javadoc) {
+@@ -143,7 +75,6 @@
+ 
+         // Add standard javac options
+         tasks.withType(JavaCompile) {
+-            dependsOn(':installGitHooks')
+             sourceCompatibility = 8
+             targetCompatibility = 8
+             // Because the target is 8, all of the public compiler classes are accessible, so
+@@ -191,8 +122,6 @@
+             if (isJava8) {
+                 options.forkOptions.jvmArgs += ["-Xbootclasspath/p:${configurations.javacJar.asPath}"]
+             }
+-            // Don't use error-prone by default
+-            options.errorprone.enabled = false
+         }
+     }
+ }
+@@ -210,90 +139,8 @@
+     }
+ }
+ 
+-/**
+- * Creates a task that runs the checker on the main source set of each subproject. The task is named
+- * "check${shortName}", for example "checkPurity" or "checkNullness".
+- * @param projectName name of the project
+- * @param checker full qualified name of the checker to run
+- * @param shortName shorter version of the checker to use to name the task.
+- * @param args list of arguments to pass to the checker
+- */
+-def createCheckTypeTask(projectName, checker, shortName, args = []) {
+-    project("${projectName}").tasks.create(name: "check${shortName}", type: JavaCompile, dependsOn: ':checker:shadowJar') {
+-        description "Run the ${shortName} Checker on the main sources."
+-        group 'Verification'
+-        dependsOn ':checker:updateJdk'
+-        // Always run the task.
+-        outputs.upToDateWhen { false }
+-        source = project("${projectName}").sourceSets.main.java
+-        classpath = files(project("${projectName}").compileJava.classpath,project(':checker-qual').sourceSets.main.output)
+-        destinationDir = file("${buildDir}")
+-
+-        options.annotationProcessorPath = files(project(':checker').tasks.shadowJar.archivePath)
+-        options.compilerArgs += [
+-                '-processor', "${checker}",
+-                '-proc:only',
+-                '-Xlint:-processing',
+-                ]
+-        options.compilerArgs += args
+-
+-        if (isJava8) {
+-            options.compilerArgs += [
+-                "-Xbootclasspath/p:${rootDir}/checker/dist/jdk8.jar",
+-                "-source",
+-                "8",
+-                "-target",
+-                "8"
+-                ]
+-        } else {
+-            options.fork = true
+-            options.forkOptions.jvmArgs += [
+-                "--add-opens", "jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED",
+-                ]
+-       }
+-    }
+-}
+-
+-/**
+- * Returns a list of all the Java files that should be formatted for the given project. These are:
+- *
+- * All java files in the main sourceSet.
+- * All java files in the tests directory that compile.
+- *
+- * @param projectName name of the project to format
+- * @return a list of all Java files that should be formatted for projectName
+- */
+-List<String> getJavaFilesToFormat(projectName) {
+-    List<File> javaFiles = new ArrayList<>();
+-    project(':' + projectName).sourceSets.forEach { set ->
+-        javaFiles.addAll(set.java.files)
+-    }
+-    // Collect all java files in tests directory
+-    fileTree("${project(projectName).projectDir}/tests").visit { details ->
+-        if (!details.path.contains("nullness-javac-errors") && details.name.endsWith('java')) {
+-            javaFiles.add(details.file)
+-        }
+-    }
+-     // Collect all java files in jtreg directory
+-    fileTree("${project(projectName).projectDir}/jtreg").visit { details ->
+-        if (!details.path.contains("nullness-javac-errors") && details.name.endsWith('java')) {
+-            javaFiles.add(details.file)
+-        }
+-    }
+ 
+-    // Collect all java files in jtreg directory
+-    fileTree("${project(projectName).projectDir}/jtregJdk11").visit { details ->
+-        if (!details.path.contains("nullness-javac-errors") && details.name.endsWith('java')) {
+-            javaFiles.add(details.file)
+-        }
+-    }
+ 
+-    List<String> args = new ArrayList<>();
+-    for (File f : javaFiles) {
+-        args += f.absolutePath
+-    }
+-    return args
+-}
+ 
+ task htmlValidate(type: Exec, group: 'Format') {
+     description 'Validate that HTML files are well-formed'
+@@ -308,43 +155,6 @@
+ }
+ 
+ 
+-// `gradle allJavadoc` builds the Javadoc for all modules in `docs/api`..
+-//   This is what is published to checkerframework.org.
+-// `gradle javadoc` builds the Javadoc for each sub-project in <subproject>/build/docs/javadoc/ .
+-//   It's needed to create the Javadoc jars that we release in Maven Central.
+-// To make javadoc for only one subproject, run `./gradlew javadoc`
+-//   in the subproject or `./gradlew :checker:javadoc` at the top level..
+-task allJavadoc(type: Javadoc, group: "Documentation") {
+-    description = 'Generates a global API documentation for all the modules'
+-    dependsOn(':checker:shadowJar')
+-    destinationDir = file("${rootDir}/docs/api")
+-    source(project(':checker').sourceSets.main.allJava, project(':framework').sourceSets.main.allJava,
+-            project(':dataflow').sourceSets.main.allJava, project(':javacutil').sourceSets.main.allJava)
+-
+-    classpath = files(subprojects.collect { it.sourceSets.main.compileClasspath })
+-    if (isJava8) {
+-        classpath += configurations.javacJar
+-    }
+-    doLast {
+-        copy {
+-            from 'docs/logo/Checkmark/CFCheckmark_favicon.png'
+-            rename('CFCheckmark_favicon.png', 'favicon-checkerframework.png')
+-            into "${rootDir}/docs/api"
+-        }
+-    }
+-}
+-
+-// See documentation for allJavadoc task.
+-javadoc.dependsOn(allJavadoc)
+-
+-configurations {
+-    requireJavadoc
+-}
+-dependencies {
+-    // https://mvnrepository.com/artifact/org.plumelib/require-javadoc
+-    requireJavadoc group: 'org.plumelib', name: 'require-javadoc', version: '0.1.2'
+-}
+-
+ 
+ /**
+  * Creates a task named taskName that runs javadoc.
+@@ -356,108 +166,8 @@
+  * passed. Defaults to true.
+  * @return the new task
+  */
+-def createJavadocTask(taskName, taskDescription, memberLevel, requireJavadoc = true) {
+-    tasks.create(name: taskName, type: Javadoc) {
+-        description = taskDescription
+-        destinationDir = file("${rootDir}/docs/tmpapi")
+-        destinationDir.mkdirs()
+-        subprojects.forEach {
+-            if(!it.name.startsWith("checker-qual")) {
+-                source += it.sourceSets.main.allJava
+-            }
+-        }
+-
+-        classpath = files(subprojects.collect { it.sourceSets.main.compileClasspath })
+-
+-        destinationDir.deleteDir()
+-        options.memberLevel = memberLevel
+-        if (requireJavadoc) {
+-            options.docletpath = configurations.requireJavadoc.asList()
+-            options.doclet = "org.plumelib.javadoc.RequireJavadoc"
+-        }
+-        options.addBooleanOption('Xdoclint:all', !requireJavadoc)
+-        options.addStringOption('Xmaxwarns', '99999')
+-
+-        // options.addStringOption('skip', 'ClassNotToCheck|OtherClass')
+-    }
+-}
+-// With JDK 11 this task produces the following error:
+-// javadoc: error - invalid flag: -d
+-createJavadocTask('requireJavadoc', 'Ensures that protected and public Java elements have Javadoc documentation.', JavadocMemberLevel.PROTECTED)
+-// With JDK 11 this task produces the following error:
+-// javadoc: error - invalid flag: -d
+-createJavadocTask('requireJavadocPrivate', 'Ensures that private, protected, and public Java elements have Javadoc documentation.', JavadocMemberLevel.PRIVATE)
+-createJavadocTask('javadocDoclintAll', 'Runs javadoc with -Xdoclint:all option.', JavadocMemberLevel.PRIVATE, false)
+-
+-task downloadJtreg(type: Download) {
+-    description "Downloads and unpacks jtreg."
+-    onlyIf { !(new File("${jtregHome}/lib/jtreg.jar").exists()) }
+-    // TODO: ci.adoptopenjdk.net is currently down, use a local copy. (4/4/2019)
+-    // src 'https://ci.adoptopenjdk.net/view/Dependencies/job/jtreg/lastSuccessfulBuild/artifact/jtreg-4.2.0-tip.tar.gz'
+-    src 'https://checkerframework.org/jtreg-4.2.0-tip.tar.gz'
+-    overwrite true
+-    dest new File(buildDir, 'jtreg-4.2.0-tip.tar.gz')
+-    doLast {
+-        copy {
+-            from tarTree(dest)
+-            into "${jtregHome}/.."
+-        }
+-        exec {
+-            commandLine('chmod',  '+x', "${jtregHome}/bin/jtdiff", "${jtregHome}/bin/jtreg")
+-        }
+-    }
+-}
+-
+-// See alternate implementation getCodeFormatScriptsInGradle below.
+-task getCodeFormatScripts() {
+-    description 'Obtain or update the run-google-java-format scripts'
+-    if (file(formatScriptsHome).exists()) {
+-        exec {
+-            workingDir formatScriptsHome
+-            executable 'git'
+-            args = ['pull', '-q']
+-            ignoreExitValue = true
+-        }
+-    } else {
+-        exec {
+-            workingDir "${formatScriptsHome}/../"
+-            executable 'git'
+-            args = ['clone', '-q', 'https://github.com/plume-lib/run-google-java-format.git', '.run-google-java-format']
+-        }
+-    }
+-}
+ 
+-// This implementation is preferable to the above because it does work in Gradle rather than in bash.
+-// However, it fails in the presence of worktrees: https://github.com/ajoberstar/grgit/issues/97
+-task getCodeFormatScriptsInGradle {
+-  description "Obtain the run-google-java-format scripts"
+-  doLast {
+-    if (! new File(formatScriptsHome).exists()) {
+-      def rgjfGit = Grgit.clone(dir: formatScriptsHome, uri: 'https://github.com/plume-lib/run-google-java-format.git')
+-    } else {
+-      def rgjfGit = Grgit.open(dir: formatScriptsHome)
+-      rgjfGit.pull()
+-    }
+-  }
+-}
+ 
+-task getPlumeScripts() {
+-    description 'Obtain or update plume-scripts'
+-    if (file(plumeScriptsHome).exists()) {
+-        exec {
+-            workingDir plumeScriptsHome
+-            executable 'git'
+-            args = ['pull', '-q']
+-            ignoreExitValue = true
+-        }
+-    } else {
+-        exec {
+-            workingDir "${plumeScriptsHome}/../"
+-            executable 'git'
+-            args = ['clone', '-q', 'https://github.com/plume-lib/plume-scripts.git', '.plume-scripts']
+-        }
+-    }
+-}
+ 
+ task pythonIsInstalled(type: Exec) {
+   description "Check that the python executable is installed."
+@@ -478,327 +188,31 @@
+ }
+ 
+ subprojects {
+-    configurations {
+-        errorprone
+-    }
+-
+-    dependencies {
+-        // https://mvnrepository.com/artifact/com.google.errorprone/error_prone_core
+-        // If you update this:
+-        //  * Temporarily comment out "-Werror" elsewhere in this file
+-        //  * Repeatedly run `./gradlew clean runErrorProne` and fix all errors
+-        //  * Uncomment "-Werror"
+-        errorprone group: 'com.google.errorprone', name: 'error_prone_core', version: '2.3.3'
+-    }
+-
+-    task checkFormat(type: Exec, dependsOn: [getCodeFormatScripts, pythonIsInstalled], group: 'Format') {
+-        description 'Check whether the source code is properly formatted'
+-        // jdk8 and checker-qual have no source, so skip
+-        onlyIf { !project.name.is('jdk8') && !project.name.startsWith('checker-qual') }
+-        executable 'python'
+-
+-        doFirst {
+-            args += "${formatScriptsHome}/check-google-java-format.py"
+-            args += "--aosp" // 4 space indentation
+-            args += getJavaFilesToFormat(project.name)
+-        }
+-        ignoreExitValue = true
+-        doLast {
+-            if (execResult.exitValue != 0) {
+-                throw new RuntimeException('Found improper formatting, try running:  ./gradlew reformat"')
+-            }
+-        }
+-    }
+-
+-    task reformat(type: Exec, dependsOn: [getCodeFormatScripts, pythonIsInstalled], group: 'Format') {
+-        description 'Format the Java source code'
+-        // jdk8 and checker-qual have no source, so skip
+-        onlyIf { !project.name.is('jdk8') && !project.name.startsWith('checker-qual') }
+-        executable 'python'
+-        doFirst {
+-            args += "${formatScriptsHome}/run-google-java-format.py"
+-            args += "--aosp" // 4 space indentation
+-            args += getJavaFilesToFormat(project.name)
+-        }
+-    }
+-
+-    shadowJar {
+-        // Relocate packages that might conflict with user's classpath.
+-        doFirst {
+-            if (release) {
+-                // Only relocate JavaParser during a release:
+-                relocate 'com.github.javaparser', 'org.checkerframework.com.github.javaparser'
+-            }
+-        }
+-        // Don't relocate javac.jar:
+-        // relocate 'com.sun', 'org.checkeframework.com.sun'
+-        // relocate 'javax','org.checkerframework.javax'
+-        // relocate 'jdk', 'org.checkerframework.jdk'
+-
+-        // These appear in annotation-file-utilities-all.jar:
+-        relocate 'org.apache', 'org.checkerframework.org.apache'
+-        relocate 'org.relaxng', 'org.checkerframework.org.relaxng'
+-        relocate 'org.plumelib', 'org.checkerframework.org.plumelib'
+-        relocate 'org.codehaus', 'org.checkerframework.org.codehaus'
+-        // relocate 'sun', 'org.checkerframework.sun'
+-        relocate 'org.objectweb.asm', 'org.checkerframework.org.objectweb.asm'
+-        relocate 'com.google', 'org.checkerframework.com.google'
+-        relocate 'plume', 'org.checkerframework.plume'
+-    }
+ 
+-    if (!project.name.startsWith('checker-qual') && !project.name.is('jdk8')) {
+-        task tags(type: Exec) {
+-            description 'Create Emacs TAGS table'
+-            commandLine "bash", "-c", "find . \\( -name jdk \\) -prune -o -name '*.java' -print | sort-directory-order | xargs ctags -e -f TAGS"
+-        }
+-    }
+ 
+     // Things in this block reference definitions in the subproject that do not exist,
+     // until the project is evaluated.
+     afterEvaluate {
+-        // Create a sourcesJar task for each subproject
+-        tasks.create(name: 'sourcesJar', type: Jar) {
+-            description 'Creates sources jar.'
+-            archiveClassifier = 'source'
+-            archiveBaseName = jar.archiveBaseName
+-            from sourceSets.main.java
+-        }
+-
+-        // Create a javadocJar task for each subproject
+-        tasks.create(name: 'javadocJar', type: Jar, dependsOn: 'javadoc') {
+-            description 'Creates javadoc jar.'
+-            archiveClassifier = 'javadoc'
+-            archiveBaseName = jar.archiveBaseName
+-            from tasks.javadoc.destinationDir
+-        }
+ 
+         // Adds manifest to all Jar files
+         tasks.withType(Jar) {
+             includeEmptyDirs = false
+-            if (archiveFileName.get().startsWith("checker-qual")) {
++            //We're only building checker-qual
+                 metaInf {
+                     from './LICENSE.txt'
+                 }
+-            } else {
+-                metaInf {
+-                    from "${rootDir}/LICENSE.txt"
+-                }
+-            }
+             manifest {
+                 attributes("Implementation-Version": "${version}")
+                 attributes("Implementation-URL": "https://checkerframework.org")
+-                if (! archiveFileName.get().endsWith("source.jar")) {
+-                    attributes('Automatic-Module-Name': "org.checkerframework." + project.name.replaceAll('-', '.'))
+-                }
+-                if (archiveFileName.get().startsWith("checker-qual")) {
+-                    attributes("Bundle-License": "MIT")
+-                } else {
+-                    attributes("Bundle-License": "(GPL-2.0-only WITH Classpath-exception-2.0)")
+-                }
+-            }
+-        }
+-
+-        // Add tasks to run various checkers on all the main source sets.
+-        createCheckTypeTask(project.name, 'org.checkerframework.checker.nullness.NullnessChecker', 'Nullness')
+-        createCheckTypeTask(project.name, 'org.checkerframework.checker.nullness.NullnessChecker', 'WorkingNullness', ['-AskipUses=com.sun.*', '-AskipDefs=org.checkerframework.checker.*|org.checkerframework.common.*|org.checkerframework.framework.*|org.checkerframework.dataflow.cfg.CFGBuilder'])
+-        createCheckTypeTask(project.name, 'org.checkerframework.framework.util.PurityChecker', 'Purity')
+-        // TODO: fix or suppress all not.interned warnings and remove the suppression here.
+-        createCheckTypeTask(project.name, 'org.checkerframework.checker.interning.InterningChecker', 'Interning', ['-AsuppressWarnings=not.interned'])
+-
+-        // Add jtregTests to framework and checker modules
+-        if (project.name.is('framework') || project.name.is('checker')) {
+-            tasks.create(name: 'jtregTests', dependsOn: ':downloadJtreg', group: 'Verification') {
+-                description 'Run the jtreg tests.'
+-                dependsOn('compileJava')
+-                dependsOn('compileTestJava')
+-                dependsOn(':checker:updateJdk')
+-                dependsOn('shadowJar')
+-
+-                String jtregOutput = "${buildDir}/jtreg"
+-                String name = 'all'
+-                String tests = '.'
+-                doLast {
+-                    exec {
+-                        executable "${jtregHome}/bin/jtreg"
+-                        args = [
+-                                "-dir:${projectDir}/jtreg",
+-                                "-workDir:${jtregOutput}/${name}/work",
+-                                "-reportDir:${jtregOutput}/${name}/report",
+-                                "-verbose:error,fail",
+-                                "-javacoptions:-g",
+-                                "-keywords:!ignore",
+-                                "-samevm",
+-                                "-javacoptions:-classpath ${tasks.shadowJar.archiveFile.get()}:${sourceSets.test.output.asPath}",
+-                                // Required for checker/jtreg/nullness/PersistUtil.java and other tests
+-                                "-vmoptions:-classpath ${tasks.shadowJar.archiveFile.get()}:${sourceSets.test.output.asPath}",
+-                        ]
+-                        if (isJava8) {
+-                            // Use Error Prone javac and source/target 8
+-                            args += [
+-                                "-vmoptions:-Xbootclasspath/p:${configurations.javacJar.asPath}",
+-                                "-javacoptions:-Xbootclasspath/p:${configurations.javacJar.asPath}",
+-                                "-javacoptions:-source 8",
+-                                "-javacoptions:-target 8"
+-                                ]
+-                            if (project.name.is('checker')) {
+-                                args += [
+-                                        "-javacoptions:-Xbootclasspath/p:${projectDir}/dist/jdk8.jar",
+-                                ]
+-                            }
+-                        } else {
+-                            args += [
+-                                    // checker/jtreg/nullness/defaultsPersist/ReferenceInfoUtil.java
+-                                    // uses the jdk.jdeps module.
+-                                    "-javacoptions:--add-modules jdk.jdeps",
+-                                    "-javacoptions:--add-exports=jdk.jdeps/com.sun.tools.classfile=ALL-UNNAMED",
+-                                    "-vmoptions:--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED",
+-                            ]
+-                        }
+-                        if (project.name.is('framework')) {
+-                            // Do not check for the annotated JDK
+-                            args += [
+-                                    "-javacoptions:-Anocheckjdk"
+-                            ]
+-                        } else if (project.name.is('checker')) {
+-                            args += [
+-                                    "-javacoptions:-classpath ${sourceSets.testannotations.output.asPath}",
+-                            ]
+-                        }
+ 
+-                        // Location of jtreg tests
+-                        args += "${tests}"
+-                    }
+-                }
+-            }
+-        }
+-
+-        // Create a task for each JUnit test class whose name is the same as the JUnit class name.
+-        sourceSets.test.allJava.filter { it.path.contains('src/test/java/tests') }.forEach { file ->
+-            String junitClassName = file.name.replaceAll(".java", "")
+-            tasks.create(name: "${junitClassName}", type: Test) {
+-                description "Run ${junitClassName} tests."
+-                include "**/${name}.class"
+-            }
+-        }
+-
+-        // Configure JUnit tests
+-        tasks.withType(Test) {
+-            if (isJava8) {
+-                jvmArgs "-Xbootclasspath/p:${configurations.javacJar.asPath}"
+-            } else {
+-                // Without this, the test throw "java.lang.OutOfMemoryError: Java heap space"
+-                forkEvery(1)
+-                jvmArgs += [
+-                        "--illegal-access=warn",
+-                        "--add-opens", "jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED",
+-                ]
+-            }
+-
+-            if (project.name.is('checker')) {
+-                dependsOn('copyJarsToDist')
+-                systemProperties += [JDK_JAR: "${projectDir}/dist/jdk8.jar"]
+-            }
+-
+-            if (project.hasProperty('emit.test.debug')) {
+-                systemProperties += ["emit.test.debug": 'true']
+-            }
+-
+-            testLogging {
+-                showStandardStreams = true
+-                // Always run the tests
+-                outputs.upToDateWhen { false }
+-
+-                // Show the found unexpected diagnostics and expected diagnostics not found.
+-                exceptionFormat "full"
+-                events "failed"
+-            }
+-
+-            // After each test, print a summary.
+-            afterSuite { desc, result ->
+-                if (desc.getClassName() != null) {
+-                    long mils = result.getEndTime() - result.getStartTime()
+-                    double seconds = mils / 1000.0
+-
+-                    println "Testsuite: ${desc.getClassName()}\n" +
+-                            "Tests run: ${result.testCount}, " +
+-                            "Failures: ${result.failedTestCount}, " +
+-                            "Skipped: ${result.skippedTestCount}, " +
+-                            "Time elapsed: ${seconds} sec\n"
+-                }
+-
+-            }
+-        }
+-
+-        // Create a runErrorProne task.
+-        tasks.create(name: 'runErrorProne', type: JavaCompile, group: 'Verification') {
+-            description 'Run the error-prone compiler on the main sources'
+-
+-            source = sourceSets.main.java.asFileTree
+-            classpath = sourceSets.main.compileClasspath.asFileTree
+-            destinationDir = new File("${buildDir}", 'errorprone')
+-
+-            // Error Prone must be available in the annotation processor path
+-            options.annotationProcessorPath = configurations.errorprone
+-            // Enable Error Prone
+-            options.errorprone.enabled = true
+-            options.errorprone.disableWarningsInGeneratedCode = true
+-            options.errorprone.errorproneArgs = [
+-                    // Many compiler classes are interned.
+-                    '-Xep:ReferenceEquality:OFF',
+-                    // These might be worth fixing.
+-                    '-Xep:DefaultCharset:OFF',
+-                    // Not useful to suggest Splitter; maybe clean up.
+-                    '-Xep:StringSplitter:OFF',
+-                    // Too broad, rejects seemingly-correct code.
+-                    '-Xep:EqualsGetClass:OFF',
+-                    // Not a real problem
+-                    '-Xep:MixedMutabilityReturnType:OFF',
+-                    // -Werror halts the build if Error Prone issues a warning, which ensures that
+-                    // the errors get fixed.  On the downside, Error Prone (or maybe the compiler?)
+-                    // stops as soon as it one warning, rather than outputting them all.
+-                    // https://github.com/google/error-prone/issues/436
+-                    '-Werror',
+-            ]
+-        }
+-
+-        // Create a nonJunitTests task per project
+-        tasks.create(name: 'nonJunitTests', type: GradleBuild, group: 'Verification') {
+-            description 'Run all Checker Framework tests except for the Junit tests.'
+-            tasks = ['checkPurity', 'checkInterning', 'checkWorkingNullness']
+-            if (project.name.is('framework') || project.name.is('checker')) {
+-                tasks += ['checkCompilerMessages', 'jtregTests']
+-            }
+-            if (project.name.is('framework')) {
+-                tasks += ['wholeProgramInferenceTests', 'loaderTests']
+-            }
+-
+-            if (project.name.is('checker')) {
+-                if (!isJava8) {
+-                    tasks += ['jtregJdk11Tests']
+-                }
+-                tasks += ['nullnessExtraTests', 'commandLineTests', 'tutorialTests']
++                //We're only building checker-qual
++                    attributes("Bundle-License": "MIT")
+             }
+         }
+ 
+-        // Create an allTests task per project
+-        tasks.create(name: 'allTests', type: GradleBuild, group: 'Verification') {
+-            description 'Run all Checker Framework tests'
+-	    // The 'test' target is just the JUnit tests.
+-            tasks = ['nonJunitTests', 'test']
+-        }
+-
+-        task javadocPrivate(dependsOn: javadoc) {
+-            doFirst {
+-                javadocMemberLevel = JavadocMemberLevel.PRIVATE
+-            }
+-            doLast {
+-                javadocMemberLevel = JavadocMemberLevel.PROTECTED
+-            }
+-        }
+     }
+ }
+ 
+-assemble.dependsOn(':checker:copyJarsToDist')
+ 
+ task checkBasicStyle(group: 'Format') {
+     description 'Check basic style guidelines.  Not related to Checkstyle tool.'
+@@ -904,7 +318,7 @@
+     startParameter = new StartParameter()
+     startParameter.setProjectProperties(release: true)
+     // This downloads rather than builds the jdk8.jar because that's what is used in the CI tests.
+-    tasks = ['clean', 'assemble', 'sourcesJar', 'javadocJar', 'allJavadoc', 'framework:allJavadocJar', 'framework:allSourcesJar', 'checker:allJavadocJar', 'checker:allSourcesJar']
++    tasks = ['clean', 'assemble']
+ }
+ 
+ task releaseAndTest(type: GradleBuild, dependsOn: 'releaseBuild') {
+--- a/settings.gradle
++++ b/settings.gradle
+@@ -1,9 +1,3 @@
+ rootProject.name = 'checker-framework'
+-include 'checker'
+-include 'javacutil'
+-include 'dataflow'
+-include 'framework'
+ include 'checker-qual'
+ include 'checker-qual-android'
+-include 'framework-test'
+-


=====================================
debian/patches/remove-doc-image-links.patch
=====================================
@@ -0,0 +1,21 @@
+Description: Use local source for auto-fetched images
+Author: Olek Wojnar <olek at debian.org>
+Forwarded: https://github.com/typetools/checker-framework/commit/fa95fd5968b6fcf07922772b9c301636150d8a68
+Last-Update: 2020-07-15
+
+--- a/docs/developer/gsoc-ideas.html
++++ b/docs/developer/gsoc-ideas.html
+@@ -5,11 +5,11 @@
+   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+   <link rel="icon" type="image/png" href=
+-  "https://checkerframework.org/favicon-checkerframework.png">
++  "../logo/Checkmark/CFCheckmark_favicon.png">
+ </head>
+ <body>
+ 
+-<img src="https://checkerframework.org/CFLogo.png" alt="Checker Framework logo" />
++<img src="../logo/Logo/CFLogo.png" alt="Checker Framework logo" />
+ 
+ <h1>GSoC ideas 2019</h1> <!-- omit from toc -->
+ 


=====================================
debian/patches/series
=====================================
@@ -0,0 +1,2 @@
+fix-gradle-build.patch
+remove-doc-image-links.patch


=====================================
debian/rules
=====================================
@@ -0,0 +1,13 @@
+#!/usr/bin/make -f
+
+export DH_VERBOSE = 1
+#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+# Ensure packages build with no Internet access
+export http_proxy=127.0.0.1:9
+export https_proxy=127.0.0.1:9
+
+%:
+	dh $@ --buildsystem=gradle --with maven_repo_helper
+
+override_dh_auto_test:


=====================================
debian/source/format
=====================================
@@ -0,0 +1 @@
+3.0 (quilt)


=====================================
debian/upstream/metadata
=====================================
@@ -0,0 +1,4 @@
+Bug-Database: https://github.com/typetools/checker-framework/issues
+Homepage: http://checkerframework.org/
+Repository: https://github.com/typetools/checker-framework.git
+Repository-Browse: https://github.com/typetools/checker-framework


=====================================
debian/watch
=====================================
@@ -0,0 +1,8 @@
+version=4
+
+# PGP signature mangle, so foo.tar.gz has foo.tar.gz.sig
+#opts="pgpsigurlmangle=s%$%.sig%"
+
+opts="repack, repacksuffix=+ds, dversionmangle=s/\+ds\d*$//" \
+   https://github.com/typetools/checker-framework/releases \
+   .*/checker-framework-(\d[\d.]*)\.tar\.gz debian uupdate



View it on GitLab: https://salsa.debian.org/java-team/checker-framework-java/-/commit/e38f99a68410d146d3e68f4fe993855e53d05740

-- 
View it on GitLab: https://salsa.debian.org/java-team/checker-framework-java/-/commit/e38f99a68410d146d3e68f4fe993855e53d05740
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20200719/cab485c8/attachment.html>


More information about the pkg-java-commits mailing list