• 12

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191


File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

Classification of artifacts in Gradle 5?

Problem: Publish javadoc and sources for a gradle project. The following code works well, even on Gradle 5.1.1:

task sourcesJar(type: Jar) {
    from android.sourceSets.main.java.srcDirs
    classifier = 'sources'

task javadoc(type: Javadoc) {
    source = android.sourceSets.main.java.srcDirs
    classpath += project.files(android.getBootClasspath().join(File.pathSeparator))

task javadocJar(type: Jar, dependsOn: javadoc) {
    classifier = 'javadoc'
    from javadoc.destinationDir

artifacts {
    archives javadocJar
    archives sourcesJar

However, in Gradle 5.1.1 the following statements are deprecated:

classifier = 'sources'


classifier = 'javadoc'

Looking at the javadoc for the evaluated method name reveals:

Deprecated. Use getArchiveClassifier()

Source: https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/bundling/AbstractArchiveTask.html#setClassifier-java.lang.String-

This doesn't make sense to me.

What change is required for my code to continue to work and not be deprecated?

Following will not show deprecation warning:


  • 1
Reply Report
      • 2
    • IntelliJ IDEA inspection produces warning: 'set' in 'org.gradle.api.provider.Property' cannot be applied to '(java.lang.String)' ... although it still works okay