Skip to content

Commit

Permalink
Feature/remove Bintray (#1593)
Browse files Browse the repository at this point in the history
  • Loading branch information
LAGIdiot authored May 17, 2021
1 parent e3125ae commit 9c0a704
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 54 deletions.
6 changes: 3 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ build:

production:
stage: deploy
script: ./gradlew curseforge bintrayUpload postDiscordNotification
script: ./gradlew curseforge postDiscordNotification
retry: 2
when: on_success
artifacts:
Expand All @@ -35,7 +35,7 @@ production:

manual_production:
stage: manual_deploy
script: ./gradlew curseforge postDiscordNotification bintrayUpload
script: ./gradlew curseforge postDiscordNotification
retry: 2
when: manual
artifacts:
Expand All @@ -46,4 +46,4 @@ manual_production:
- master
except:
refs:
- tags
- tags
52 changes: 3 additions & 49 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import com.google.gson.JsonObject
import com.jfrog.bintray.gradle.BintrayExtension
import com.jfrog.bintray.gradle.BintrayExtension.PackageConfig
import com.jfrog.bintray.gradle.BintrayExtension.VersionConfig
import com.matthewprenger.cursegradle.CurseExtension
import com.matthewprenger.cursegradle.CurseProject
import com.matthewprenger.cursegradle.CurseRelation
import net.minecraftforge.gradle.user.UserBaseExtension
import org.apache.commons.lang.StringUtils
import org.apache.commons.lang3.StringUtils
import org.apache.http.client.methods.HttpPost
import org.apache.http.entity.ContentType
import org.apache.http.entity.StringEntity
Expand All @@ -18,14 +15,11 @@ import org.eclipse.jgit.revwalk.RevCommit
import org.eclipse.jgit.revwalk.RevObject
import org.eclipse.jgit.revwalk.RevTag
import org.eclipse.jgit.revwalk.RevWalk
import java.time.ZoneOffset
import java.time.ZonedDateTime
import java.time.format.DateTimeFormatter
import java.util.*

buildscript {
repositories {
jcenter()
mavenCentral()
maven {
name = "jitpack"
setUrl("https://jitpack.io")
Expand All @@ -38,13 +32,13 @@ buildscript {
dependencies {
classpath("com.github.GregTechCE:ForgeGradle:FG_2.3-SNAPSHOT")
classpath("org.eclipse.jgit:org.eclipse.jgit:5.8.0.202006091008-r")
classpath("org.apache.commons:commons-lang3:3.12.0")
}
}

plugins {
id("com.matthewprenger.cursegradle") version "1.1.0"
id("maven-publish")
id("com.jfrog.bintray") version "1.8.4"
}

apply {
Expand Down Expand Up @@ -477,43 +471,3 @@ publishing {
}
}
}


fun BintrayExtension.pkg(config: PackageConfig.() -> Unit) = PackageConfig().also {
it.config()
this.pkg = it
}

fun BintrayExtension.version(config: VersionConfig.() -> Unit) {
VersionConfig().also {
it.config()
this.pkg.version = it
}
}

bintray {
val bintrayUser = if (project.hasProperty("bintrayUser")) project.property("bintrayUser") as String else System.getenv("BINTRAY_USER")
val bintrayApiKey = if (project.hasProperty("bintrayApiKey")) project.property("bintrayApiKey") as String else System.getenv("BINTRAY_API_KEY")

if (bintrayUser == null || bintrayApiKey == null) {
println("Skipping bintrayUpload task as there is no api key or user in the environment")
return@bintray
}

user = bintrayUser
key = bintrayApiKey
setPublications("GTCEPublication")
publish = true
override = true //not sure why it is needed
pkg {
repo = "dev"
name = "GregTechCE"
userOrg = "gregtech"
setLicenses("LGPL-3.0")
vcsUrl = "https://github.com/GregTechCE/GregTech.git"
version {
name = project.version as String
released = ZonedDateTime.now(ZoneOffset.UTC).format(DateTimeFormatter.ISO_INSTANT)
}
}
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Tue May 29 20:08:12 CEST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip

0 comments on commit 9c0a704

Please sign in to comment.