mirror of
https://github.com/ysoftdevs/cpp-examples.git
synced 2026-01-11 14:30:32 +01:00
update C plugin examples to work with Gradle 2.3
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
apply plugin: 'c'
|
||||
|
||||
executables {
|
||||
main {
|
||||
model {
|
||||
components {
|
||||
main(NativeExecutableSpec) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
apply plugin: 'c'
|
||||
apply plugin: 'visual-studio'
|
||||
|
||||
executables {
|
||||
main {
|
||||
model {
|
||||
components {
|
||||
main(NativeExecutableSpec) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,45 +1,34 @@
|
||||
import org.gradle.api.publish.maven.MavenPublication
|
||||
buildscript {
|
||||
repositories {
|
||||
maven {
|
||||
url "http://dl.bintray.com/gesellix/gradle-plugins"
|
||||
}
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
}
|
||||
dependencies {
|
||||
classpath "de.gesellix:gradle-debian-plugin:12"
|
||||
}
|
||||
plugins {
|
||||
id "nebula.os-package" version "2.0.3"
|
||||
}
|
||||
|
||||
apply plugin: 'maven'
|
||||
apply plugin: 'pkg-debian'
|
||||
apply plugin: 'c'
|
||||
|
||||
version = "1.0.0"
|
||||
|
||||
executables {
|
||||
hello {
|
||||
}
|
||||
}
|
||||
|
||||
task prepare(type: Copy) {
|
||||
description "Copy files to Linux directory layout"
|
||||
from "build/binaries/helloExecutable"
|
||||
into "build/linux/usr/bin"
|
||||
}
|
||||
|
||||
debian {
|
||||
packagename = "hello-fimuni"
|
||||
publications = ['fimuni']
|
||||
controlDirectory = "$projectDir/src/main/resources/control"
|
||||
changelogFile = "$projectDir/src/main/resources/txt/changelog.txt"
|
||||
|
||||
data {
|
||||
def baseDir = "$buildDir/linux"
|
||||
dir {
|
||||
name = baseDir
|
||||
model {
|
||||
components {
|
||||
hello(NativeExecutableSpec) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ospackage {
|
||||
packageName = "hello"
|
||||
version = "1.0"
|
||||
release = 1
|
||||
os = LINUX
|
||||
packageDescription = "Linux Gradle hello package"
|
||||
summary = "contains binary with hello world example"
|
||||
|
||||
from("build/binaries/helloExecutable") {
|
||||
into "/usr/bin/"
|
||||
}
|
||||
}
|
||||
|
||||
buildDeb {
|
||||
requires("libc6")
|
||||
}
|
||||
|
||||
buildRpm {
|
||||
requires("libc6")
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
/etc/default/hello-fimuni
|
||||
@@ -1,11 +0,0 @@
|
||||
Source: hello-fimuni
|
||||
Section: web
|
||||
Priority: optional
|
||||
Version: 1.0.0
|
||||
Maintainer: Juraj Michalek <juraj.michalek@ysoft.com>
|
||||
Homepage: http://www.ysoft.com/
|
||||
Package: hello-fimuni
|
||||
Architecture: all
|
||||
Depends:
|
||||
Description: Hello FI MUNI
|
||||
Example of Linux packaging for Gradle.
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Post installation script - executed at the last phase of installation
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Post remove script
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# Pre-uninstallation script
|
||||
|
||||
Reference in New Issue
Block a user