Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Mirai
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Mirai
Commits
a5551804
Commit
a5551804
authored
Feb 15, 2020
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fuck bintray publish
parent
4d1ce5cd
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
181 additions
and
6 deletions
+181
-6
build.gradle
build.gradle
+1
-0
gradle/publish-japt.gradle
gradle/publish-japt.gradle
+104
-0
gradle/publish.gradle
gradle/publish.gradle
+1
-1
mirai-core-qqandroid/build.gradle.kts
mirai-core-qqandroid/build.gradle.kts
+1
-1
mirai-core/build.gradle.kts
mirai-core/build.gradle.kts
+1
-1
mirai-japt/build.gradle.kts
mirai-japt/build.gradle.kts
+73
-3
No files found.
build.gradle
View file @
a5551804
...
...
@@ -4,6 +4,7 @@ buildscript {
jcenter
()
mavenCentral
()
google
()
maven
{
url
"https://dl.bintray.com/kotlin/kotlin-eap"
}
maven
{
url
'https://dl.bintray.com/kotlin/kotlin-dev/'
}
}
...
...
gradle/publish-japt.gradle
0 → 100644
View file @
a5551804
// 部分源码来自 kotlinx.coroutines
def
pomConfig
=
{
licenses
{
license
{
name
"AGPL-V3"
url
"https://www.gnu.org/licenses/agpl-3.0.txt"
distribution
"repo"
}
}
developers
{
developer
{
id
"mamoe"
name
"Mamoe Technologies"
}
}
scm
{
url
"https://github.com/mamoe/mirai"
}
}
bintray
{
def
keyProps
=
new
Properties
()
def
keyFile
=
file
(
"../keys.properties"
)
if
(
keyFile
.
exists
())
keyFile
.
withInputStream
{
keyProps
.
load
(
it
)
}
user
=
keyProps
.
getProperty
(
"bintrayUser"
)
key
=
keyProps
.
getProperty
(
"bintrayKey"
)
pkg
{
repo
=
'mirai'
name
=
"mirai-japt"
licenses
=
[
'AGPL'
]
vcsUrl
=
'https://github.com/mamoe/mirai'
}
}
afterEvaluate
{
project
.
publishing
.
publications
.
forEach
{
publication
->
publication
.
pom
.
withXml
{
def
root
=
asNode
()
//root.appendNode('groupId', project.group)
//root.appendNode('artifactId', project.name)
//root.appendNode('version', project.version)
root
.
appendNode
(
'name'
,
project
.
name
)
root
.
appendNode
(
'description'
,
project
.
description
)
root
.
appendNode
(
'url'
,
'https://github.com/mamoe/mirai'
)
root
.
children
().
last
()
+
pomConfig
}
}
}
bintrayUpload
.
doFirst
{
publications
=
project
.
publishing
.
publications
}
bintrayUpload
.
dependsOn
{
def
list
=
new
LinkedList
<
Task
>()
list
.
add
(
tasks
.
getByName
(
"build"
))
list
.
addAll
(
tasks
.
findAll
{
task
->
task
.
name
.
contains
(
'Jar'
)
})
list
.
addAll
(
tasks
.
findAll
{
task
->
task
.
name
.
startsWith
(
'generateMetadataFileFor'
)
})
list
.
addAll
(
tasks
.
findAll
{
task
->
task
.
name
.
startsWith
(
'generatePomFileFor'
)
})
list
}
// empty xxx-javadoc.jar
task
javadocJar
(
type:
Jar
)
{
archiveClassifier
=
'javadoc'
}
publishing
{
publications
.
all
{
// add empty javadocs (no need for MPP root publication which publishes only pom file)
if
(
it
.
name
!=
'kotlinMultiplatform'
)
{
it
.
artifact
(
javadocJar
)
}
// Rename MPP artifacts for backward compatibility
def
type
=
it
.
name
switch
(
type
)
{
case
'kotlinMultiplatform'
:
it
.
artifactId
=
"$project.name"
break
case
'metadata'
:
it
.
artifactId
=
"$project.name-common"
break
case
'jvm'
:
it
.
artifactId
=
"$project.name"
break
case
'js'
:
case
'native'
:
it
.
artifactId
=
"$project.name-$type"
break
}
// disable metadata everywhere, but in native modules
if
(
type
==
'maven'
||
type
==
'metadata'
||
type
==
'jvm'
||
type
==
'js'
)
{
moduleDescriptorGenerator
=
null
}
}
}
\ No newline at end of file
gradle/publish.gradle
View file @
a5551804
...
...
@@ -88,7 +88,7 @@ publishing {
it
.
artifactId
=
"$project.name-common"
break
case
'jvm'
:
it
.
artifactId
=
"$
project.name
"
it
.
artifactId
=
"$
{project.name.replace("
-
jvm
", "")}
"
break
case
'js'
:
case
'native'
:
...
...
mirai-core-qqandroid/build.gradle.kts
View file @
a5551804
...
...
@@ -5,7 +5,7 @@ plugins {
id
(
"kotlinx-atomicfu"
)
id
(
"kotlinx-serialization"
)
`maven-publish`
id
(
"com.jfrog.bintray"
)
version
"1.8.4-jetbrains-3"
// DO NOT CHANGE THIS VERSION UNLESS YOU WANT TO WASTE YOUR TIME
id
(
"com.jfrog.bintray"
)
version
"1.8.4-jetbrains-3"
}
apply
(
from
=
rootProject
.
file
(
"gradle/publish.gradle"
))
...
...
mirai-core/build.gradle.kts
View file @
a5551804
...
...
@@ -5,7 +5,7 @@ plugins {
id
(
"kotlinx-atomicfu"
)
id
(
"kotlinx-serialization"
)
`maven-publish`
id
(
"com.jfrog.bintray"
)
version
"1.8.4-jetbrains-3"
// DO NOT CHANGE THIS VERSION UNLESS YOU WANT TO WASTE YOUR TIME
id
(
"com.jfrog.bintray"
)
version
"1.8.4-jetbrains-3"
}
apply
(
from
=
rootProject
.
file
(
"gradle/publish.gradle"
))
...
...
mirai-japt/build.gradle.kts
View file @
a5551804
import
java.util.*
buildscript
{
repositories
{
mavenLocal
()
jcenter
()
mavenCentral
()
google
()
}
dependencies
{
// Do try to waste your time.
@
kotlin
.
Suppress
(
"GradleDependency"
)
// 1.8.4 不能跑
classpath
(
"com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0"
)
}
}
plugins
{
kotlin
(
"jvm"
)
java
`maven-publish`
id
(
"com.jfrog.bintray"
)
version
"1.8.4-jetbrains-3"
// DO NOT CHANGE THIS VERSION UNLESS YOU WANT TO WASTE YOUR TIME
// maven
id
(
"com.jfrog.bintray"
)
version
"1.8.0"
}
apply
(
from
=
rootProject
.
file
(
"gradle/publish.gradle"
))
val
kotlinVersion
:
String
by
rootProject
.
ext
val
atomicFuVersion
:
String
by
rootProject
.
ext
val
coroutinesVersion
:
String
by
rootProject
.
ext
...
...
@@ -54,4 +70,58 @@ dependencies {
tasks
.
withType
<
JavaCompile
>()
{
options
.
encoding
=
"UTF-8"
}
bintray
{
val
keyProps
=
Properties
()
val
keyFile
=
file
(
"../keys.properties"
)
if
(
keyFile
.
exists
())
keyFile
.
inputStream
().
use
{
keyProps
.
load
(
it
)
}
user
=
keyProps
.
getProperty
(
"bintrayUser"
)
key
=
keyProps
.
getProperty
(
"bintrayKey"
)
setPublications
(
"mavenJava"
)
setConfigurations
(
"archives"
)
pkg
.
apply
{
repo
=
"mirai"
name
=
"mirai-japt"
setLicenses
(
"AGPLv3"
)
publicDownloadNumbers
=
true
vcsUrl
=
"https://github.com/mamoe/mirai"
}
}
@Suppress
(
"DEPRECATION"
)
val
sourcesJar
by
tasks
.
registering
(
Jar
::
class
)
{
classifier
=
"sources"
from
(
sourceSets
.
main
.
get
().
allSource
)
}
publishing
{
/*
repositories {
maven {
// change to point to your repo, e.g. http://my.org/repo
url = uri("$buildDir/repo")
}
}*/
publications
{
register
(
"mavenJava"
,
MavenPublication
::
class
)
{
from
(
components
[
"java"
])
groupId
=
rootProject
.
group
.
toString
()
artifactId
=
"mirai-japt"
version
=
mirai_japt_version
pom
.
withXml
{
val
root
=
asNode
()
root
.
appendNode
(
"description"
,
description
)
root
.
appendNode
(
"name"
,
project
.
name
)
root
.
appendNode
(
"url"
,
"https://github.com/mamoe/mirai"
)
root
.
children
().
last
()
}
artifact
(
sourcesJar
.
get
())
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment