< prev index next >

build.gradle

Print this page

106 
107 def getOS() {
108     def os = System.getProperty('os.name').toLowerCase()
109     if (os.startsWith('linux')) {
110         return 'linux'
111     }
112     if (os.startsWith('mac')) {
113         return 'macos'
114     }
115     if (os.startsWith('win')) {
116         return 'windows'
117     }
118     if (os.startsWith('sunos')) {
119         return 'solaris'
120     }
121     throw new GradleException("Unexpected operating system: " + os)
122 }
123 
124 def getCPU() {
125     def cpu = System.getProperty('os.arch').toLowerCase()
126     if (cpu.startsWith('amd64')) {
127         return 'x64'
128     }
129     if (cpu.startsWith('x86') || cpu.startsWith('i386')) {
130         return 'x86'
131     }
132     if (cpu.startsWith('sparc')) {
133         return 'sparc'
134     }
135     if (cpu.startsWith('ppc')) {
136         return 'ppc'
137     }
138     if (cpu.startsWith('arm')) {
139         return 'arm'
140     }
141     throw new GradleException("Unexpected operating system: " + cpu)
142 }
143 
144 task local(type: Copy) {
145     doFirst {
146         delete project.buildDir

106 
107 def getOS() {
108     def os = System.getProperty('os.name').toLowerCase()
109     if (os.startsWith('linux')) {
110         return 'linux'
111     }
112     if (os.startsWith('mac')) {
113         return 'macos'
114     }
115     if (os.startsWith('win')) {
116         return 'windows'
117     }
118     if (os.startsWith('sunos')) {
119         return 'solaris'
120     }
121     throw new GradleException("Unexpected operating system: " + os)
122 }
123 
124 def getCPU() {
125     def cpu = System.getProperty('os.arch').toLowerCase()
126     if (cpu.startsWith('amd64') || cpu.startsWith('x86_64') || cpu.startsWith('x64')) {
127         return 'x64'
128     }
129     if (cpu.startsWith('x86') || cpu.startsWith('i386')) {
130         return 'x86'
131     }
132     if (cpu.startsWith('sparc')) {
133         return 'sparc'
134     }
135     if (cpu.startsWith('ppc')) {
136         return 'ppc'
137     }
138     if (cpu.startsWith('arm')) {
139         return 'arm'
140     }
141     throw new GradleException("Unexpected operating system: " + cpu)
142 }
143 
144 task local(type: Copy) {
145     doFirst {
146         delete project.buildDir
< prev index next >