Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
only52607 committed Feb 10, 2021
1 parent 905925e commit db70477
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 50 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ src/test
.idea
.gradle
.settings
doc
local.properties
78 changes: 52 additions & 26 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@ buildscript{
maven { url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
jcenter()
}
dependencies {
classpath 'com.novoda:bintray-release:0.9.2'
classpath 'com.github.jengelman.gradle.plugins:shadow:6.1.0'
}
// dependencies {
// classpath 'com.github.jengelman.gradle.plugins:shadow:5.2.0'
// }
}

plugins {
id 'java'
id 'org.jetbrains.kotlin.jvm' version "1.4.21"
id 'com.github.johnrengelman.shadow' version "6.1.0"
id 'com.github.johnrengelman.shadow' version "5.2.0"
id "com.jfrog.bintray" version "1.8.4"
id 'maven-publish'
// id "org.jetbrains.kotlin.kapt" version "1.4.21"
id "net.mamoe.mirai-console" version "2.0.0"
// id "net.mamoe.mirai-console" version "2.0.0"
}


group aritifact_group
version aritifact_version

Expand Down Expand Up @@ -78,19 +78,6 @@ allprojects {
}
}

tasks.withType(Javadoc).all { enabled = false }

apply plugin: 'com.novoda.bintray-release'
publish {
userOrg = aritifact_userorg
groupId = aritifact_group
artifactId = aritifact_name
publishVersion = aritifact_version
desc = aritifact_description
website = aritifact_website
}


shadowJar {
archiveBaseName.set(aritifact_name)
archiveClassifier.set('')
Expand All @@ -102,11 +89,50 @@ shadowJar {
}
}

mirai {
coreVersion = mirai_core_version
publishing {
it.repo = "mirai"
it.packageName = aritifact_name
it.override = true
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
archiveClassifier = 'sources'
}

task javadocJar(type: Jar) {
from javadoc
archiveClassifier = 'javadoc'
}

bintray {
Properties properties = new Properties()
InputStream inputStream = project.rootProject.file('local.properties').newDataInputStream() ;
properties.load(inputStream)
user = properties.getProperty('BINTRAY_USER') //System.getenv('BINTRAY_USER')
key = properties.getProperty('BINTRAY_KEY') //System.getenv('BINTRAY_KEY')
override = true //如果有相同版本是否覆盖
publish = true //是否上传后直接发布
pkg {
repo = 'maven'
name = project.name
userOrg = user
licenses = ['AGPL-V3']
vcsUrl = "github.com/only52607/lua-mirai"
issueTrackerUrl = "github.com/only52607/lua-mirai/issues"
version {
name = aritifact_version
desc = aritifact_description
released = new Date()
vcsTag = aritifact_version
// attributes = ['gradle-plugin': 'com.use.less:com.use.less.gradle:gradle-useless-plugin']//可忽略的属性,有需求可以查看官方文档进行相关配置
}
}
publications = ['LMPublication']
}
publishing {
publications {
LMPublication(MavenPublication) {
artifact(jar) //配置库jar包
artifact(sourcesJar) //配置库源码jar包
artifact(javadocJar) //配置库javadoc jar包
groupId aritifact_group //包名
artifactId aritifact_id //库id
version aritifact_version //设置版本号
}
}
}
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
--warning-mode=all
kotlin.code.style=official
mainClassName='com.ooooonly.luaMirai.MainKt'
aritifact_userorg=ooooonly
aritifact_version=2.0.0
aritifact_name=lua-mirai
aritifact_id=luaMirai
aritifact_group=com.ooooonly
aritifact_description=lua support for mirai
aritifact_website=https://github.com/only52607/lua-mirai
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
org.gradle.jvmargs=-Dfile.encoding=UTF-8
org.gradle.jvmargs=-Dfile.encoding=UTF-8
23 changes: 0 additions & 23 deletions src/main/kotlin/com/ooooonly/luaMirai/lua/NumberedGlobals.kt

This file was deleted.

0 comments on commit db70477

Please sign in to comment.