1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

gradleのプラグインmavenをmaven-publishに変更

Posted at

現在の6.8.3で既にmavenは非推奨なのでmaven-publishへ変更をした。

apply plugin: 'maven'

uploadArchives {
  repositories {
    mavenDeployer {
      repository(url: "https://localhost/release") {
        authentication(userName: project.properties.mavenUser, password: project.properties.mavenPassword)
      }
      snapshotRepository(url: "https://localhost/snapshot") {
        authentication(userName: project.properties.mavenUser, password: project.properties.mavenPassword)
      }
    }
  }
}

apply plugin: 'maven-publish'

publishing {
  repositories {
    maven {
      def releasesRepoUrl = "https://localhost/release"
      def snapshotsRepoUrl = "https://localhost/snapshot"
      url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
      credentials {
        username project.properties.mavenUser
        password project.properties.mavenPassword
      }
    }
  }
}

exampleが色々あるので基本的にはそれを基にしての書換作業になる。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?